943,740 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Marked Solved
  • Views: 62580
  • VB.NET RSS
Aug 13th, 2004
0

Crystal report in vb.net, printing problems

Expand Post »
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!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
AK47 is offline Offline
12 posts
since Aug 2004
Sep 28th, 2004
0

Re: Crystal report in vb.net, printing problems

Quote 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
Reputation Points: 10
Solved Threads: 1
Newbie Poster
john price is offline Offline
1 posts
since Sep 2004
Oct 8th, 2004
0

Re: Crystal report in vb.net, printing problems

I'm speechless... I can't believe I didn't think of that!

Thanks!!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
AK47 is offline Offline
12 posts
since Aug 2004
Apr 8th, 2008
0

Re: Crystal report in vb.net, printing problems

if you find difficulty in printing from Crystal report , u can export it as PDF or Excel format and print it.

its very easy.
Last edited by Narue; Jan 19th, 2009 at 11:32 am. Reason: snipped link
Reputation Points: 4
Solved Threads: 0
Newbie Poster
janet_ss is offline Offline
4 posts
since Apr 2008
Jan 20th, 2009
0

Very Urgent Requirement.....Please Help...........

I have a requirement:

I have a Parameterised Crystal Report.
I have one Button called btnView.
On btnClick event of that...

i want to Export the Crystal Report to PDF.

I have another Button called btnPrint.
On btnPrint event of that...

I want to convert to PDF and after that i want to print that PDF with Asp.net and C#.net.


Here the problem is i can able to send parameters to the Crystal Report but i am not able to Export the Parameterised Report in to PDF.

and also with Code ASP.Net and C#.Net i could not able to Print PDF directly with out showing it to the user
Reputation Points: 10
Solved Threads: 0
Newbie Poster
gadepallisuresh is offline Offline
1 posts
since Jan 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: VB 2005 - Slow , Sloooow Text Program
Next Thread in VB.NET Forum Timeline: 2008 displaying the task category vista event logs





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC