Solved

Crystal Reports XI only prints to deafult printer

Posted on 2011-03-24
3
482 Views
Last Modified: 2012-05-11
Hi,
we've developed a J2EE app, which uses Crystal Reports Server XI (a.k.a. CRXI) to print documents that support operations.
We are using remote scheduling to accomplish that task.  We've been able to supply the printer name (for example, Printer1) into the request that we send to CRXI.  
Sometimes (very few, dont know why) CRXI prints to the supplied printer (Printer1).  
But now, it always does print to the default OS printer (DefaultPrinter).  
Looking in the RPT history, i can see that the print operation was successful, and that CRXI prints to Printer1.  But the job  is processed by, and paper sheets are thrown by, DefaultPrinter.
I want to know which are the possible causes for this behaviour.  We've not changed code that manages printing operation inside our app.
SO is Win 2003 Server R2 Standard Editon.
Thanks in advance for your comments.
Jaime
0
Comment
Question by:japintoce
  • 2
3 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 35215743
Is this a new application or was it running correctly and the behavior changed?

mlmcc
0
 

Accepted Solution

by:
japintoce earned 0 total points
ID: 35219971
Hi,
it's an old app and behavior changed. BUT:
We've found the solution.   It's a little complex to try to explain, but i'll try.
In order to create the CR object to schedule a report, we were using this query (as stated in some documentation, i think):
SELECT TOP 1 *
FROM CI_INFOOBJECTS
WHERE SI_PROGID = 'CrystalEnterprise.Report'
   AND SI_INSTANCE = 0
   AND SI_NAME = 'ReportName'
But this query (SELECT *) is very slow and inefficient, so after researching and googling we came to this:
SELECT TOP 1 SI_NAME,SI_OWNER, SI_FILES,
   SI_PROCESSINFO.SI_LOGON_INFO,
   SI_PROCESSINFO.SI_PROMPTS

FROM CI_INFOOBJECTS
WHERE SI_PROGID = 'CrystalEnterprise.Report'
   AND SI_INSTANCE = 0
   AND SI_NAME = 'ReportName'
We ommited the printer settings object in the above query; it's weird because i think the CR API should have complained about referencing an object that does not exists.  But instead, uses default printer !!!!!!
After a lot more of researching and googling, we found the missing object:    
                     SI_PROCESSINFO.SI_PRINTER_INFO
So the final functional query is:
SELECT TOP 1 SI_NAME,SI_OWNER, SI_FILES,
   SI_PROCESSINFO.SI_LOGON_INFO,
   SI_PROCESSINFO.SI_PROMPTS,
   SI_PROCESSINFO.SI_PRINTER_INFO
FROM CI_INFOOBJECTS
WHERE SI_PROGID = 'CrystalEnterprise.Report'
   AND SI_INSTANCE = 0
   AND SI_NAME = 'ReportName'

Hope this help.  Thanks for your comments.
0
 

Author Closing Comment

by:japintoce
ID: 35321811
It works; it's documented on CRXI docs.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question