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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

printing from command line

Status
Not open for further replies.

sdkramer

Programmer
Oct 1, 2005
9
US
I'm trying to print a report in Crystal Reports from the command line and not running into too much sucess. I'm using CR XI. When I run crw32 with the report's filename following it, it opens the file. I've tried /a through /z. /p seems promising. It pauses and it's the only one that closes itself after it's done but nothing comes out the printer. The printer, if this is useful is a Lexmark T430 and the OS is Windows Server 2003 SP 1.

Can anyone help me? I'm sure I'm not the first person to need this.
 
Additional information: On a hunch I checked the event log. There is an error logged when I use the /p switch it says

Application Error
Faulting application crw32.exe version 11.0.0.1282, faulting module unknown, version 0.0.0.0 fault address 0x00000000.

I can't help but think perhaps it's faulting because it isn't getting some other argument like the printer name or port I have tried /p:USB0001 or /p:"Lexmark T430" but they do not generate errors when I use a space instead I get an error.
 
The link to Ken Hamady's list of 3rd-party Crystal tools is at:
Crystal itself doesn't have a command line api that allows you to trigger printing or exporting. Most of the tools that provide such an api are listed by Ken under the "Report Managers" category. While my DataLink Viewer is listed under the "Viewer" category, it does provide a command line interface that allows you to trigger printing to the default or a specified printer.

If you have a Crystal Developer license, you can create your own little application to do the same thing.

- Ido

Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top