Solved

Crystal Reports XI only prints to deafult printer

Posted on 2011-03-24
3
481 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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 Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

776 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