Crystal report tricks

  • Thread starter Thread starter Bill Nguyen
  • Start date Start date
B

Bill Nguyen

I posted this on public.vb.crystal forum and nobody cares to answer. Since
CR is part of .NEt, I hope i can get better help her:

VB.NET 2003
Reports created in CR10

Using CrystalReportViewer, I would like
1. to print directly to a default printer without prompting which printer to
select
2. export to PDF then print on the printer quietly

Any help is greatly appreciated.

Bill
 
Bill said:
I posted this on public.vb.crystal forum and nobody cares to answer. Since
CR is part of .NEt, I hope i can get better help her:

VB.NET 2003
Reports created in CR10

Using CrystalReportViewer, I would like
1. to print directly to a default printer without prompting which printer to
select
2. export to PDF then print on the printer quietly

Any help is greatly appreciated.

Bill
I've worked with many versions of CR, both within the program and using
the viewer, and I've never seen an option for printing without being
prompted for the printer. As far as the PDF, again that depends on the
choices CR 10 offers - I've only worked with CR up to V9. But since
that is a proprietary component, it would be very difficult to add more
functionality to it than it offers.

Tom
 
1. the first parameter of Report.PrintOut function control the prompting
i am using vb6 and cr9, i think it should be provided in cr10 too

2. arobat reader have unoffical parameter to print PDF directly, but u may
find not useful, u may seacrh from google for more information

Hopes that help
Martin
 
1) Use the PrintToPrinter method of the cr document
myreport.PrintToPrinter(1, False, 0, 0)
Search msdn for more info.

2) Whilst you're there on msdn, take a look at export and exporttodisk
methods.

Not sure what you mean by print quietly, maybe you mean 1).
 
Andy;
You mean to use ReportDocufment instead of CrystalReportViewer?
I'm using CrystalReportViewer control. It has only .PrintReport method as
follow:

With myCrystal.CrystalReportViewer1



'.ReportSource() = reportDocument1

..ReportSource() = myReport

..SelectionFormula = mSelection

If rptParam0 <> "NA" Then

..ParameterFieldInfo = ParameterFields

End If

Select Case prMode

Case 1

..Refresh()

myCrystal.WindowState = FormWindowState.Maximized

myCrystal.ShowDialog()

Case 2

..RefreshReport()

myCrystal.WindowState = FormWindowState.Maximized

myCrystal.ShowDialog()

Case 3

..Visible = False

..PrintReport()

Case Else



End Select



End With
 
Yes.
Your snippet doesn't show it but presumably myreport is a
reportdocument.
If it isn't, it could be.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top