|
-
Dec 23rd, 2006, 10:55 AM
#1
Thread Starter
Lively Member
Print a report by code
I am using Crystal report. want to print a report without pressing the print button. will you please help me?
-
Dec 24th, 2006, 02:02 PM
#2
Re: Print a report by code
Here is one example of setting the printer for a report without the print dialog.
This part invokes the actual printing.
Report.PrintOut True, 1
http://www.vbforums.com/showpost.php...17&postcount=2
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 
-
Dec 27th, 2006, 09:51 AM
#3
Thread Starter
Lively Member
Re: Print a report by code
thank you for your code
RPTCashMemo.PrintOut True, 1
with this code only the print dialog box is appearing but i wnat to print the page automaticly. without click the diolog box ok button.
Please help me
thank you
-
Dec 27th, 2006, 01:13 PM
#4
Re: Print a report by code
Yes it will do that unless you populate the previous properties like shown in my code.
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 
-
Apr 3rd, 2007, 03:16 AM
#5
Lively Member
Re: Print a report by code
hi RobDog888! do you happen to know where i could find a documentation of all methods and properties of the report viewer, and their corresponding parameters?
like
vb Code:
Report.PrinterSetup lHwnd
what the hell "lHwnd" means or what else can be used aside from it.
a valuable link or file would be cool...
thanks in advance dude.
-
Apr 3rd, 2007, 03:57 AM
#6
Re: Print a report by code
The PrinterSetup dialog takes a owner window handle that I passed in the variable: lHwnd. 
I found most of the stuff back in the day in the help file but since 8.5, CR has really improved their help file and online knowledge base. For documentation there is a pdf download from CR that is a basic walk though on using the latest version of CR.
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 
-
Apr 3rd, 2007, 06:24 AM
#7
Lively Member
Re: Print a report by code
found what im looking for
many thanks
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
|