cancel
Showing results for 
Search instead for 
Did you mean: 

A document processed by the JRC engine cannot be opened in the C++

jos_dealmeida
Explorer
0 Kudos

Hi,

I'm currently building a .Net application (and NOT an IIS app, it's a standalone WPF application) to view report from Crystal Server 2013.

I successfuly manage to make my app work with Report of type "Crystal Report 2013" but when i try to view a "Crystal Report for Entreprise", i get this "little and non informative" error message :

"A document processed by the JRC engine cannot be opened in the C++"

when i call the CrystalDecisions.ReportAppServer.ClientDoc.ISReportAppFactory.OpenDocument(Object DocID, Int32 Options) with a correct and existing report id.

I've seen in this page : From Crystal Reports 2008 to SAP Crystal Reports 2013 or SAP Crystal Reports for Enterprise - Busine...

that "There is no Java or .NET SDK to create standalone 2 tier applications or to create applications that create or modify SAP Crystal Reports for Enterprise, however applications can be created with the SAP BusinessObjects BI 4.x SDK  to use the platform servers to manage, schedule and view reports for both SAP Crystal Reports 2013 and  SAP Crystal Reports for Enterprise."

But i undertand that i can make a .Net application to only view SAP Crystal Reports for Enterprise !!!


Is that rights ?


Here's my working code :


ISSessionMgr Manager = new SessionMgr();

ISEnterpriseSession m_Session = Manager.Logon( CMS_Login, CMS_Password, CMS_Host, CMS_Security );

ReportAppFactory m_ReportAppFactory = ( ReportAppFactory )Session.GetService( SERVICE_HOST, SERVICE_REPORT_FACTORY ).Interface;

InfoStore infoStore = new InfoStore(m_Session.GetService( SERVICE_HOST, SERVICE_INFOSTORE ));

InfoObjects reports = infoStore.Query(String.Format(INFOSTORE_QUERY_BY_ID, Report_ID));

InfoObject report = reports[FIRST_ITEM];

ReportAppFactory factory = ( ReportAppFactory )m_Session.GetService( "", "RASReportFactory" ).Interface;

ReportClientDocument clientDoc = new ReportClientDocumentClass();

clientDoc = factory.OpenDocument(report.ID, 0);

After that the clientDoc is given to another class that extract all the parameters send them to another services (that know how to fill the parameters with values) and push back into the report.


CrystalReportsViewer control = target as CrystalReportsViewer;

if ( control != null ) {

      control.ViewerCore.ReportSource = e.NewValue;

}

Everything is working fine with this method and it work with local file (with another method to retrieve the report) and "Crystal Report 2013" publish in a "Crystal Server 2013"...

Is there a way to make it work with Entreprise version ???

(The strange thing is that i'm pretty sure that this method worked with Crystal Server 2012 and another sdk) but it was one year ago (when i was doing some test) and i dont remember where i found them but the methodolgy was the same)

Thanks to everyone who clould help

P.S:

from msdn : https://msdn.microsoft.com/en-US/library/ms227361%28v=vs.80%29.aspx it seems possible, or am i wrong ?

Message was edited by: José De Almeida

Message was edited by: José De Almeida

Message was edited by: José De Almeida

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Hi Jose

You cannot use clientDoc = factory.OpenDocument(report.ID, 0);   to open a report built in Crystal Reports for Enterprise. Your options are RESTful web services or opendocument.




- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

jos_dealmeida
Explorer
0 Kudos

Thanks a lot for your answer.

Could you please give me some doc about opendocument if it's usuable in a wpf application.

Because the main requirement is to embed the report in the crystal report viewer and use it after....


I don't think RESTful web services is good for me, because i still need the possibility of user settings some parameter... and i had the feeling that with restfull i cannot use the crystalreportviewer in wpf.


But i'm maybe wrong.


The strange thing is why and where it's written that Crystal Report Entreprise are not working with the SDK.

Answers (3)

Answers (3)

jos_dealmeida
Explorer
0 Kudos

More info....

I've managed to make it work.... but with report without parameter...

Here's the code :


Task<Container>.Run(() => {

                Container ct = new Container();

                ct.Manager = new SessionMgr();

                ct.Session = ct.Manager.Logon("Administrator", "PASSWORD", "192.168.1.32:6400", "secEnterprise");

                ct.Service = ct.Session.GetService(SERVICE_HOST, SERVICE_INFOSTORE);

                ct.Factory = (PSReportFactory)ct.Session.GetService(SERVICE_HOST, SERVICE_REPORT_FACTORY).Interface;

                ct.Store = new InfoStore(ct.Service);

                InfoObjects reports = ct.Store.Query(String.Format(INFOSTORE_QUERY_BY_ID, "12878")); //6700  //12878

                InfoObject report = reports[1];

                ct.ReportSource = ct.Factory.OpenReportSource(report.ID);

                return ct;

}).ContinueWith((t) => {

                try {

                    CrystalReportsViewer.ViewerCore.EnterpriseLogon = t.Result.Session;

                    CrystalReportsViewer.ViewerCore.ReportSource = t.Result.ReportSource;

                } catch (Exception ex) {

                    if (true) { }

     }

}, TaskScheduler.FromCurrentSynchronizationContext());

Now the issue is when i need parameter, i got that :

and it's a web browser : because i've got that in it : <HTML></HTML>

So could someone help me understand how i can get the parameter values form ?

And after that, a way to get all the parameters from the report and i'm good....

Is there somewhere documentation for that ?

I know, i got a lot of question but it would fantastic if someone could help.

former_member188030
Active Contributor
0 Kudos

Hi Jose,

See the CR REST API guide below, mainly the Interactive parameters section.

http://help.sap.com/businessobject/product_guides/boexir4/en/xi4sp6_cr_restful_ws_en.pdf

For more queries about REST APIs, post queries at

Hope this helps,

Bhushan

jos_dealmeida
Explorer
0 Kudos

Hi Bhushan,

Thanks for the answer, but your document dont explain me how i can retrieve the list of parameters of a given report. It's not explain how i can get a report and show it to the user either. (or give the possibility to the end user to see a prompt with parameters options)

It would be very helpfull if you could explain me the way that SAP had imagined how developpers could create application that show their report.... event if that mean that i need to create a wpf component that embed an internet explorer window.....(i dont like at all that idea)

Thanks again for all the help

jos_dealmeida
Explorer
0 Kudos

So it seems that RESTful web services would be the way to go.... (because the gap between the two api/sdk will certainly never be fulfilled)

Is there someone who could show me the way to show a report in a viewer using this way (and letting the user filling some properties/parameters) ?

Is it even possible ?


Thanks to every one in advance.

jos_dealmeida
Explorer
0 Kudos

Ok i found that :http://www.sdn.sap.com/irj/boc/go/portal/prtroot/docs/library/uuid/40bccdfd-88a6-2b10-1da1-c47a54b62...

and page 5 :

Enterprise SDK – With the Enterprise SDK, you can create Java, .NET, or ASP web portal applications, view all report types, use report creation and modification APIs, manage users, instances, groups, custom programs and events, and access security and scalability features.

Viewers SDK  – Use when you want to view Crystal reports instances or templates. The Viewers SDK is available in Java, .NET, and COM APIs and handles common viewing scenarios such as paging, exporting, searching, drilling-down, and printing, and common exporting scenarious such as PDF and

Microsoft Office. This SDK also handles prompting and filtering – you can either allow the viewer to prompt users or you can set the values yourself in your application.

So now the killing question (and yes it's an old document), is it real ?