Solved

Crystal Reports XI only prints to deafult printer

Posted on 2011-03-24
3
484 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

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. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

732 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