Solved

Crystal Reports XI only prints to deafult printer

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
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…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now