Dynamic Crystal reports in VB using Crystal Viewer control
hi,
my problem is i m new to crystal reports. I have prepared a application in vb 6.0 which is used for printing bills. When enter all the particulars and press print the crystal viewer is showing only the first bill which was saved. wat i want wen i give the print command the viewer shud show the present bill, so it can be printed.
thanks!!
Re: Dynamic Crystal reports in VB using Crystal Viewer control
Sounds like you have the report option "Save data with report" selected in CR.
Moved from Classic VB forum.
I also have a few examples in my signature on CR and VB6. ;)
Re: Dynamic Crystal reports in VB using Crystal Viewer control
You need to pass Crystal a 'selection formula' which will display the records according to your criteria, eg
VB Code:
Dim Report As New CrystalReport1
Report.RecordSelectionFormula = "{mytable.myfield}='mycondition'"
CRViewer91.ReportSource = Report
CRViewer91.ViewReport
EDIT: Yes, good point RobDog. I think 'Save Data with Report' is the default setting. A trap for young players!
Re: Dynamic Crystal reports in VB using Crystal Viewer control
Thanks guys, atleast i have sumthin 2 work on. will b lookin for ur help if there is any problem in crystal reports
Thanks!!
Re: Dynamic Crystal reports in VB using Crystal Viewer control
Quote:
Originally Posted by RobDog888
Sounds like you have the report option "Save data with report" selected in CR.
Moved from Classic VB forum.
I also have a few examples in my signature on CR and VB6. ;)
hi Rob
i used ur code but the same problem is persisting, if i want to print a particular record , say for ex i want to invoice no C10002 from rest of all records or i have saved invoice no C10005 and i want to print it then wat shud we do?
thanks!!
Re: Dynamic Crystal reports in VB using Crystal Viewer control
How are you setting your DataSource for the report? If by an ADO recordset then just filter the rs and set it to your reports datasource.
Re: Dynamic Crystal reports in VB using Crystal Viewer control
Quote:
Originally Posted by RobDog888
How are you setting your DataSource for the report? If by an ADO recordset then just filter the rs and set it to your reports datasource.
hi,
thanx for replyin, but i m very sorry i didnt get u, i m also new to vb if u can explain wat u said earlier a little more it wud of gr8 help.
thanx!!