cancel
Showing results for 
Search instead for 
Did you mean: 

OpenDocument Printer button open always the PDF Export

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member183750
Active Contributor
0 Kudos

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

https://twitter.com/SAPCRNetSup

Former Member
0 Kudos

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

former_member183750
Active Contributor
0 Kudos

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

DellSC
Active Contributor
0 Kudos

It also depends on which browser you're in and whether its security is set to allow ActiveX components to run.  For example, I don't think Chrome will run ActiveX components, so it will always go to PDF to print.

-Dell

Former Member
0 Kudos

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...

Former Member
0 Kudos

Hello, I am focusing on Internet Explorer 11, I do not need to make it work on all browsers (lucky me...)

Regards

former_member183750
Active Contributor
0 Kudos

Can you try with IE lower that 11? Also, try IE 11 in compatibility mode(?).

- Ludek

0 Kudos

Check with your CMC Administrator and make sure your user is not set to PDF viewer.

Don