on 11-19-2014 2:53 PM
Hello
I am using a COM object to pilot the generation of Crystal Reports from Crystal Server using the OpenDocument Viewer.
From the COM Object I open a new Internet Explorer window with the URL of the report to open and everything is working fine: the viewer is opened, the report generated and displayed on the screen.
There is only one problem: when I push the Print Button, the Viewer insists to open an Export to PDF window, and I must generate a intermediary PDF file before printing (see picture).
On the other hand, when I use the View Report from CMC, I get the proper Print dialog box, with all printers and options displayed correctly in the viewer.
It seems that the OpenDocument viewer is unable to open the Print Dialog correctly and it just proposes me to export before printing, while the direct call to the report from CMC is working as expected.
I would like to know if this is the normal implementation (so no possibility to open the Print dialog from OpenDocument) or I am missing something.
Please note that I have done the following:
1) Setup the correct Printer Option in the Report
2) Changed the Crystal Reports in CMC -> Preferences -> Crystal Reports and tried all (Web, Web ActiveX, Web Java). None of the settings seems to impact OpenDocument viewer, but they are taken into consideration if I view the report via CMC
3) Added a couple of fake printers in Crystal Reports Printer List (Application->Crystal Reports Configuration -> Printer List) with no success.
Any information you can provide me would be greatly appreciated.
Best regards
Hi Angelo
The viewer has two print modes; PDF print and ActiveX print. These can be configured in the viewer properties in the VS IDE or at runtime off of the viewer object.
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ludek
thank you for the hint on the viewer.
I have seen in some post where it is explained how to change a property in the viewer. In this specific case I do not manage directly a viewer object in the code. I just write down the url in a Internet Explorer process that open the viewer using mainly REST API, something like:
http://MYSERVER:8080/BOE/OpenDocument/1407242304/CrystalReports/viewrpt.cwr?id=10277
So unless I can specify the PrintMode via a URL parameter, I cannot interact directly with the Viewer. The COM object is a piece of software that is executed on the user workstation that uses REST API to communicate the commands to the central Crystal Server. I have for example implemented a method to browse the repository using REST and then parsing the resulted XML in the COM object, by creating a local representation of the folders.
In this way my COM object is like a proxy from a local application and Crystal Server.
Regards
Angelo
Interesting. My BI4.1 install defaults to activeX - which I think is what you are looking for. I believe there’s logic to fall back to PDF if for some reason the activeX printControl cannot be found or loaded (use the search box in the top right corner and use a search string such as 'crystal activex net'. That will bring up a KBA or two on why an ActiveX may not load. Also, check to see whats being used by viewing the source code when the viewer is displayed. Look for “advprint” in the html source.
Oh and viewrpt.cwr is legacy and you should be using opendocumnet calls instead. Additionally, since you are also using REST to build the folder view of the reports, you can also get the Opendocument link from the REST response when requesting the properties of a report through REST. That would be the easiest way to get the URL.
- Ludek
Thank you for the response.
I have the feeling that it is a sort of fallback. But there is a strange fact:
1) I use Internet Explorer via CMC to view a report. When I push Print, I get the correct Printer Setting page.
2) I use Internet Explorer executed via c# code with the URL of the Report + parameters. The report generates, I can change parameters, but the print shows only the Export to PDF.
This happen on the same machine, and no matter if I use OpenDocument or viewrpt.cwr.
I can also force the viewer to be an ActiveX (via an URL parameter), but I always get the Export to PDF.
Very challenging issue...
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.