|
-
Aug 20th, 2005, 01:22 PM
#1
Thread Starter
New Member
creating reports
I really need some help please, My vb6 program works great for my boss, but he wants it to print reports, there are not numerical figures involved, most if not all text. How do I make an app as simple as this show a report capable of printing. (I have Crystal Report 8.5) Thanks.- kgambit
Private Sub cmdPrint_Click()
'this is supposed to show the report.
End Sub
Private Sub cmdSave_Click()
'add a new entry the table.
With Data2.Recordset
.AddNew
!CompliedBy = txtComplied
!CaseNumber = DataCombo1.Text
!Date = txtDate
!OtherOfficers = txtOther
!Subject = txtSubject
!details = txtDetail
!ReportNumber = txtReportNumber
.Update
End With
Data2.Refresh
End Sub
-
Aug 20th, 2005, 04:42 PM
#2
Re: creating reports
Welcome to the Forums.
You can use your ADO rs set as the DataSource for your report if the recordset is what you want/need to display. I have an example in my signature.
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 
-
Aug 21st, 2005, 07:09 PM
#3
Thread Starter
New Member
Re: creating reports
Thanks for the welcome and information, but could you epound some more on how to do it.
-
Aug 21st, 2005, 08:47 PM
#4
Re: creating reports
Ok, but where is your data going to come from? Data2, database, textfile, controls on your vb form, etc.
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 
-
Aug 22nd, 2005, 05:34 PM
#5
Thread Starter
New Member
Re: creating reports
The data is comming from controls on the form and i want to be able to pull up data and print from the database too, but if i can pull the info from the form then I'll be okm with the rest
-
Aug 22nd, 2005, 05:44 PM
#6
Re: creating reports
If you have a database and the info on the form is also from the db then its best to pull it from the db using ADO. Then we can set the DataSourceof the report to the recordset and be done, so to speak.
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 
-
Aug 24th, 2005, 12:28 PM
#7
Thread Starter
New Member
Re: creating reports
Is there anywhere I can find a simple example of this or is it small enough you can explain please, because my program is working great, only waiting for the reports, either data report or crystal report 8.5, anyone will work great for me, because as I said its mostly text, no fomulas.
-
Aug 28th, 2005, 12:24 PM
#8
Junior Member
Re: creating reports
If you have simple text to report in vb then you can use the word automation and it is very easy to generate text reports in MS Word. I am also working on this path although beginner, but getting much. If you are interested, i can present my little help
-
Aug 28th, 2005, 09:59 PM
#9
Re: creating reports
Use CR's IDE to create a report as you would like to view it as. Then you can use the CR Viewer control in VB to open the report and populate its DataSource. The CR Viewer has buttons that can automatically print or export to a number of formats.
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 
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
|