on 03-15-2013 4:41 PM
Hi,
I have a webapplication that allows user to select from the list of available crystal reports and dynamically view them based on the selection.Here is the code I am using
ReportDocument rptDoc = null;
SessionMgr sessionMgr;
EnterpriseSession enterpriseSession = null;
try
{
sessionMgr = new SessionMgr();
enterpriseSession = sessionMgr.Logon("user", "psswd", "server", "Windows AD");
EnterpriseService enterpriseService = enterpriseSession.GetService("InfoStore");
InfoStore infoStore = new InfoStore(enterpriseService);
String infoQuery = String.Format("SELECT TOP 1
* FROM CI_INFOOBJECTS WHERE SI_PROGID='CrystalEnterprise.Report' AND " +" SI_NAME LIKE
'%{0}%' ORDER BY SI_Creation_Time desc", "TestProduct");
InfoObjects infoObjects = infoStore.Query(infoQuery);
InfoObject infoObject = infoObjects[1];
rptDoc = new ReportDocument();
rptDoc.Load(infoObject, enterpriseSession);
this.CrystalReportViewer1.ReportSource= rptDoc;
}
catch (Exception Ex)
{
throw Ex;
}
finally
{
rptDoc.Close();
rptDoc.Dispose();
if(enterpriseSession != null)
enterpriseSession.Logoff();
}
This code worked perfectly for us using CR 2011. We have begin creating unx universe and to use these for the reports we are migrating to CR for enterprise. However
the above code gives us "unsupported operation.A document processed by the JRC engine cannot be opened in the C++ stack" exception on report document load. Any help would be greatly appreciated.
This code will not work for Crystal Reports for Enterprise reports, it will only work for CR2011 reports.
There is a new SDK for Crystal Reports for Enterprise that is available. It is one of our new Restful SDK's.
Also, moving this post to the Enterprise SDK forums.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you point me to where this new SDK for Crystal Reports for Enterprise that is available aslo if possible could you send me an example to view the crystal report.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can find the useful resources related to RESTful APIs here:
http://scn.sap.com/docs/DOC-27465
Some restful api sample codes can be found here:
http://wiki.sdn.sap.com/wiki/x/uoMNEQ
You can also check following for the issue you are seeing:
The error could also be caused by the mixed references. You can check your project for the same. For eg you are using CRS2011(14.x) along with CRVS2010(13.x)
~ Saurabh
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.