How to use the record selection formula in CR9 programatically using vb.net? I have a combo box that displays the date. If I select date, I can generate a report based on the selected date. Thanks in advance
16 11623 QVeen72 1,445
Recognized Expert Top Contributor
Hi,
Pass this RecordSelection Formula to the Report: -
m_Report.RecordSelectionFormula ="{MyTable.MyDateField} =Date(" & Format(Combo1.Text,"yyyy,mm,dd") & ")"
-
Regards
Veena
Ah, I see, that's what Im missing, I acutally used that ".recordselecti onformula = Date & " combbox.text... .and it says a date-time is required here... I guess this is what Im missing. Thanks for your response. I check it out.
Hi Veena,
I tried to used this in my record selection, however, I received an error, "The ) is missing" when I checked it, any part here that I missed? thnks.
VB code:
CrystalReportVi ewer1.Selection Formula = "{vTITO_Rpt.Wor kDate} In Date (" & Format(cmbxDate From.Text, "YYYY,MM,DD ") & ") To Date (" & Format(cmbxDate To.Text, "YYYY,MM,DD ") & ")"
Regards
QVeen72 1,445
Recognized Expert Top Contributor
Hi,
For CR9, it .RecordSelectio nFormula.
Looks like, you have not declared the Report Object..
What code are you using to display the report...?
Check this :
m_Report.Select ionFormula = "{vTITO_Rpt.Wor kDate} In Date (" & Format(cmbxDate From.Text, "YYYY,MM,DD ") & ") To Date (" & Format(cmbxDate To.Text, "YYYY,MM,DD ") & ")"
Regards
Veena
The "m_report" here you use is the Crystal Report viewer, right? I'm using CR9, tried to use the .RecordSelectio nFormula, but it's not working. I tried to use the previous post you have here but still to no avail. What do I miss here? Thanks
QVeen72 1,445
Recognized Expert Top Contributor
Hi,
Post your complete code here..
It will be easy for me to Identify..
Regards
Veena
Hi Veena,
Here is my code I used, I can't find what's seems to the error here, but everytime I used it, I encountered the error "The ) missing" . Thanks in advance
CrystalReportVi ewer1.ReportSou rce = New ReportName CrystalReportVi ewer1.ReportSou rce = ReportDocument
CrystalReportVi ewer1.Selection Formula = "{vTITO_Rpt.Wor kDate} In Date (" & Format(cmbxDate From.Text, "YYYY,MM,DD ") & ") To Date (" & Format(cmbxDate To.Text, "YYYY,MM,DD ") & ")"
CrystalReportVi ewer1.Show()
Regards
QVeen72 1,445
Recognized Expert Top Contributor
Hi,
Syntax of SelectionFormul a seems OK,
Did you check both the combo-boxes, have data..?
You may get error, if either one of them is Blank...
and FromDate < ToDate..?
Regards
Veena
Hi,
Yes, both combo boxes has data, I even tried to change the combo box to text box, inputting the date manuallu, but to no avail. Can we say that the code is ok?
Thanks
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Pierre |
last post by:
Hi,
Can anyone tell me how I can populate Crystal Reports, using a DataTable in C#?
Regards,
Pierre
|
by: tomi |
last post by:
Hi
I'm using RDC for analyzing .rpt files. I need to output all sections,
but by using Section.Name i get names like "Section1", "section2" while
I'd like to have names like "Group Header a" a.s.o. I'm using Crystal
version 10 with library CRAXDRT.
Can anyone halp me? Thx alot
tomi
|
by: lmalavika |
last post by:
Hi All,
I need to display crystal Reports using ASP. The webserver hosting this
will not have Crystal Reports installed on it.
We had done a similar requirement in ASP.Net by using the crystal
viewers provided in .Net.
Can something similar be done in ASP. Can we use the same objects in
ASP as in ASP.Net
|
by: srivalli |
last post by:
I am Sridhar
In vb I use Crystal Reports for reporting but this if i call the
crystal report then it displays once and exit but it dont show
i call the Crystal report as
Crystalreport1.action=1
If u know the answer please reply me
|
by: zEE |
last post by:
Hi,
I'm facing an issue when I use the MicrosoftMail option for emailing
the crystal report. My code is as follows -
ReportDocument ReportFile = new ReportDocument();
ReportFile.Load(filename);
ReportFile.SetDataSource(DataSet1);
CrystalDecisions.Shared.ExportOptions myExportOptions;
| |
by: chyogesh76 |
last post by:
i created a report in crystal report i am using it in vb6.0. while printing through vb it was printing in a4 size but i want make it custom size(small size 5'' X10"). how can i do. any one please help me to find it with kind heart.
|
by: Smish |
last post by:
please can ne1 guide me how to create a report by passing parameters by using crystal reports using c#
thanx
|
by: Roy Brown |
last post by:
I am trying to use Crystal Reports X1 with Visual basic 6 and an Access 2003 database, I have downloaded an evaluation copy of Crystal Reports and have tried to run the sample code provided, this code doesn't work correctly for it says it can't load the report file. My main question is can I use CR X1 with VB6 or do I need a earlier version,...
|
by: meshmeshaa |
last post by:
hiii ,
really need help and quickly please...
i have created a database using php and i need to get reports from this database using php code but i don't know how to make crystal reports using php ??!!!!
can anyone plz send me a code to try it as really i have no time ....
thanks in advance.
|
by: ramkumar533 |
last post by:
Hi All..
Now i am doing a Project related with students report. There i need to display the each student profile with his image..
The image location is stored in the database table. While i tried to retrieve the image location and load to the OLE Object , Which i have placed in the report to hold the image. But If i suppose...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |