|
-
Oct 23rd, 2005, 11:44 PM
#1
Thread Starter
Lively Member
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!!
-
Oct 23rd, 2005, 11:54 PM
#2
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Oct 23rd, 2005, 11:57 PM
#3
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!
Pete
No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.
-
Oct 24th, 2005, 12:21 AM
#4
Thread Starter
Lively Member
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!!
-
Oct 24th, 2005, 03:45 AM
#5
Thread Starter
Lively Member
Re: Dynamic Crystal reports in VB using Crystal Viewer control
 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!!
-
Oct 24th, 2005, 10:19 AM
#6
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Oct 25th, 2005, 05:09 AM
#7
Thread Starter
Lively Member
Re: Dynamic Crystal reports in VB using Crystal Viewer control
 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!!
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
|