User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 363,520 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,424 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser:
Views: 34518 | Replies: 3 | Solved
Reply
Join Date: Aug 2004
Posts: 12
Reputation: AK47 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
AK47 AK47 is offline Offline
Newbie Poster

Help Crystal report in vb.net, printing problems

  #1  
Aug 13th, 2004
I created a crystal report in vb.net 2003 that generates invoices. I need to be able to print this report to a Canon copy machine(with four paper drawers), but I can't select the paper drawer to print from at runtime, it has to print to the fourth drawer. I am using a ReportDocument object with the report source being Invoice.rpt within .NET.
Here is my current code for printing:

Public Sub PrintForm(ByVal s As String)
rdInvoice.RecordSelectionFormula = "trim({SOP10100.BACHNUMB}) = '" & s & "' and {SOP10100.SOPTYPE} in [4, 3]"
rdInvoice.Refresh()
rdInvoice.PrintOptions.PrinterName = "\\RAPCONT1\Canon iR3300 PS3"
rdInvoice.PrintOptions.PaperSource = PaperSource.Lower
rdInvoice.PrintToPrinter(1, False, 5, 5)
End Sub

Any ideas on how I can select at runtime the paper tray to print from?
Thanks in advance!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2004
Posts: 1
Reputation: john price is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
john price john price is offline Offline
Newbie Poster

Solution Re: Crystal report in vb.net, printing problems

  #2  
Sep 28th, 2004
Originally Posted by AK47
I created a crystal report in vb.net 2003 that generates invoices. I need to be able to print this report to a Canon copy machine(with four paper drawers), but I can't select the paper drawer to print from at runtime, it has to print to the fourth drawer. I am using a ReportDocument object with the report source being Invoice.rpt within .NET.
Here is my current code for printing:

Public Sub PrintForm(ByVal s As String)
rdInvoice.RecordSelectionFormula = "trim({SOP10100.BACHNUMB}) = '" & s & "' and {SOP10100.SOPTYPE} in [4, 3]"
rdInvoice.Refresh()
rdInvoice.PrintOptions.PrinterName = "\\RAPCONT1\Canon iR3300 PS3"
rdInvoice.PrintOptions.PaperSource = PaperSource.Lower
rdInvoice.PrintToPrinter(1, False, 5, 5)
End Sub



Any ideas on how I can select at runtime the paper tray to print from?
Thanks in advance!



Simplest method is to create a printer with the default properties you require and just switch to that printer when required.


hope this helps
Reply With Quote  
Join Date: Aug 2004
Posts: 12
Reputation: AK47 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
AK47 AK47 is offline Offline
Newbie Poster

Solution Re: Crystal report in vb.net, printing problems

  #3  
Oct 8th, 2004
I'm speechless... I can't believe I didn't think of that!

Thanks!!
Reply With Quote  
Join Date: Apr 2008
Posts: 2
Reputation: janet_ss is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
janet_ss janet_ss is offline Offline
Newbie Poster

Re: Crystal report in vb.net, printing problems

  #4  
Apr 8th, 2008
if you find difficulty in printing from Crystal report , u can export it as PDF or Excel format and print it.

http://vb.net-informations.com/cryst...export_pdf.htm

its very easy.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 3 (0 members and 3 guests)

 

DaniWeb VB.NET Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the VB.NET Forum

All times are GMT -4. The time now is 4:17 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC