|
-
Nov 1st, 2006, 04:28 AM
#1
Thread Starter
New Member
Help with formula
Im using CR 10 and VB 6.0
problem: cant get report of ticket no 3. I get by default 1st and hav to navigate from CRviewer.
My code
Private Sub Form_Load()
Dim Appl As New CRAXDRT.Application
Dim Report As New CRAXDRT.Report
Set Report = Appl.OpenReport("d:\BusTkt.rpt")
CRViewer1.ReportSource = Report
CRViewer1.SearchByFormula "{Bus_Ticket.Ticket_Number} = '3'"
CRViewer1.ViewReport
End Sub
-
Nov 1st, 2006, 04:37 AM
#2
Re: Help with formula
Are you not getting the report of ticket number 3 or you are not getting the 2 or 1 also.
Read the crystal report tutorial at my signature post 1, 2 and 3 where I give some example related to the formulas in the CR.
-
Nov 1st, 2006, 05:16 AM
#3
Fanatic Member
Re: Help with formula
if Bus_Ticket.Ticket_Number is of number type then do not use '
WHETHER YOU SUCCEED OR FAIL IS NOT AS IMPORTANT AS WHETHER YOU TRIED YOUR BEST 
-
Nov 1st, 2006, 05:27 AM
#4
Re: Help with formula
Check the option in the file menu if the save data with report is true then remove it.
-
Nov 1st, 2006, 11:50 AM
#5
Thread Starter
New Member
Re: Help with formula
are u guys sure that we can use selection formula with CRviewer.
I know we can use it in cr 8.8 but not sure if we can use in CR10.
I m getting all the records but i want the report of a selected record.
-
Nov 1st, 2006, 01:21 PM
#6
Re: Help with formula
Have you tried for the seletion formula , it will also work there, have you try for it!
Just add the crystal report tutorial at my signature and see how to use the selection forumula with different time.
-
Nov 1st, 2006, 01:26 PM
#7
Thread Starter
New Member
Re: Help with formula
but when i type . after CRviewer1 i dont get selection formula option.
-
Nov 1st, 2006, 01:42 PM
#8
Re: Help with formula
VB Code:
CRViewer1.SearchByFormula
Use this but it is better then if you use the crystal report control instead of the crviewer, so using this you get some more property and able to use the multiple report at a time
-
Nov 2nd, 2006, 04:15 AM
#9
Thread Starter
New Member
Re: Help with formula
i hav CR10 which doesnt hav CRYSTAL REPORT CONTROL ONLY HAS VIEWER.
-
Nov 2nd, 2006, 10:34 AM
#10
New Member
Re: Help with formula
anil_295 says....
but when i type . after CRviewer1 i dont get selection formula option......
I'm new to CR lateste versions, but just a thought.
Shouldn’t "SearchByFormula" be collection of Report object-in your case Report- rather than of CRViewer
try looking for Report.DataDefinition.RecordSelectionFormula
I'm not sure this will work, but just trying to throw an idea...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|