Last post Aug 05, 2014 01:21 AM by inao
Aug 04, 2014 02:24 PM|inao|LINK
I have Been Trying to get a solution how to print the crystal report programmatically by clicking button for a almost 4 months Now. I Have asked the question .. and mark as answer without getting a solution by third party user. Like here
And searched around. mark answer ... I dont know .. how is been answer as a solution.. Link
Please Please Plizz help me to get this solution.(PRINTING A CRYSTAL REPORT DIRECTLY)
Aug 04, 2014 02:35 PM|markfitzme|LINK
You don't have any control over printing from a browser. If you export you still don't have any control over the printing only the ability to export to pdf. The only real control we have is using CSS media queries that enable us to change the formatting
of a page for printing, making some elements hidden for the print media and others visible. That's about it. The browsers just don't give us the control.
There is a possibility to print sections of a page and this is done by swapping around HTML, but usually ends up making a mess of the page or stop it's functioning afterwards especially if scripting is involved with the page.
Aug 05, 2014 01:21 AM|inao|LINK
How is Exporting and printing work? please let me know
I am using print method which only print to asp. server printer I have tried a lot . so that it can print to Local Printer. But FAIL!!.
reportdocument.PrintOptions.PrinterName = "DEFAULT PRINTER"
reportdocument.PrintToPrinter(1, False, 0, 0)
And Also i tried exporting the Report to PDF. And print . that does work properly.
the code which i used
Dim CrReport As New Crystal_Report11opdnormalposting() '/ Report Name
Dim CrExportOptions As ExportOptions
Dim CrDiskFileDestinationOptions As New DiskFileDestinationOptions()
Dim CrFormatTypeOptions As New PdfRtfWordFormatOptions()
CrDiskFileDestinationOptions.DiskFileName = "path\xx.pdf"
'Specify a page range (optional)
// Set the destination to a disk file
'// Set the format to PDF
.ExportFormatType = ExportFormatType.PortableDocFormat
'// Set the destination options to DiskFileDestinationOptions object
Protected Sub PDF_PRINT_FSN()
Dim psiPrint As New System.Diagnostics.ProcessStartInfo()
psiPrint.Verb = "print"
psiPrint.WindowStyle = ProcessWindowStyle.Hidden
psiPrint.FileName = "path\xx.pdf"
psiPrint.UseShellExecute = True
THIS CODE PATIALLY WORK
if you have better code .. which work on client side please please help