Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing Directly to Network Devices

Status
Not open for further replies.

mushin

Programmer
Oct 4, 2000
49
0
0
SCR 8.5,ActiveX --

When sending a report to a network printer using the
printer Name,port,driver from the windows Registry,
Crystal does not print. There is no error. Local Printers work fine.

Some PC's work perfectly, others do not. The SCR viewer always works, but when sending diretly to a specific printer address, SCR on some pc's fail.

I believe crpe32.dll is the print engine utilized in this case so I assume a version problem, but they are all the same..

Has anybody experienced this ? or even know what to look at here ?
 
hi mushin,

i'm new to the crystal report enviroment. I've on your thread that you were able to print a report directly to you local printer without previewing it. I currently have that problem. I've been to the crystal report support site and downloaded their sample but still no luck. can you please give me some advice?

thank you

 
In my case I am using SCR 8.5 but only the activeX that was packaged with vers 7, not RDC.

Basically you need to supply the port,printer name and driver to the printreport as in:
>>
chctrlframe:CrystalReport:reportfilename = "programs/reports/r_dc_sum.rpt".
chctrlframe:CrystalReport:reporttitle = "Discharge Summary".
chctrlframe:CrystalReport:parameterFields(0) = "pversion;" + gcversion + ";TRUE".
chctrlframe:CrystalReport:parameterFields(1) = "psite;" + prim_site + ";TRUE".
chctrlframe:CrystalReport:parameterFields(2) = "".
chctrlframe:CrystalReport:parameterFields(3) = "".
chctrlframe:CrystalReport:Destination = printDestination. /* to printer:1,Window:0,File:2 */
if printDestination = 1 then do: /* printer */
chctrlframe:CrystalReport:printerName = report_defaults.PrinterName.
chctrlframe:CrystalReport:printerDriver = report_defaults.PrinterDriver.
chctrlframe:CrystalReport:printerPort = report_defaults.PrinterPort.
end.
else do: /* file */
chctrlframe:CrystalReport:printFileName = report_defaults.printerName.
chctrlframe:CrystalReport:printFileType = printFileType.
end.
chctrlframe:CrystalReport:printreport.
<<
hope this helps you......
 
thank you mushin, i will try it and let you know if it worked...

thank you
 
Hi Mushin, i am also trying to print CR report directly on to network printer/local printer without viewing it.

I am instantiating CR Viewer in Cold Fusion page using VB Script.

I am calling CRViewer.PrintReport but it didn't printed on local printer. I don't have printer def's installed on my web server.Do i need to install printer defs on web server?

Another clarification on your code:

chctrlframe: is an IFrame that displays CR Report on ur web page?

If i could not print directly from CR Viewer on to printer, i have another page that displays CR Report in IFrame(Uses CR Viewr behind scenes..) when i pass report URL to IFrame SRC attribute.

Is above code you shown is related to IFrame?

Thanks,
Rama Kommineni
 
No chCtrlFrame is a com handle within the code . I am using the crystal OCX
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top