I'm using Crystal Report 10.
I'm trying to write a web application to view instances of a certain report.
My page lists all instances of a report showing some info on it like creation time, starting schedule time, ending schedule time, owner and export format.
Now I would like to add an hyperlink named 'show instance' to show the instance to the user but once i click on the hyperlink i get this error on the page:
com.crystaldecisions.report.web.viewer.CrystalReportViewer
An error occurred at the server : The object you are trying to access (ID = 45410) has type CrystalEnterprise.Pdf. The Page Server only supports objects of type milcpbsapprs001.cacheserver. Please select a different object.
So, i suppose i do not use the properly viewer but i cannot figure out which one i have to use.
to view the instance, i use the following code:
CrystalReportViewer viewer = new CrystalReportViewer();
IReportSourceFactory factoryPS = (IReportSourceFactory) enterpriseSession.getService("PSReportFactory");
// the 'instanceObj' variable is the IInfoObject of the instance, fetched by a CE Query.
IReportSource reportSource = factoryPS.openReportSource(instanceObj,Locale.getDefault());
viewer.setReportSource(reportSource);
viewer.setEnterpriseLogon(enterpriseSession);
viewer.setOwnPage(true);
viewer.setName("View Report");
viewer.processHttpRequest(request, response, getServletContext(), null);
viewer.dispose();
Did i miss something ?
Thanx
Ivan.
I'm trying to write a web application to view instances of a certain report.
My page lists all instances of a report showing some info on it like creation time, starting schedule time, ending schedule time, owner and export format.
Now I would like to add an hyperlink named 'show instance' to show the instance to the user but once i click on the hyperlink i get this error on the page:
com.crystaldecisions.report.web.viewer.CrystalReportViewer
An error occurred at the server : The object you are trying to access (ID = 45410) has type CrystalEnterprise.Pdf. The Page Server only supports objects of type milcpbsapprs001.cacheserver. Please select a different object.
So, i suppose i do not use the properly viewer but i cannot figure out which one i have to use.
to view the instance, i use the following code:
CrystalReportViewer viewer = new CrystalReportViewer();
IReportSourceFactory factoryPS = (IReportSourceFactory) enterpriseSession.getService("PSReportFactory");
// the 'instanceObj' variable is the IInfoObject of the instance, fetched by a CE Query.
IReportSource reportSource = factoryPS.openReportSource(instanceObj,Locale.getDefault());
viewer.setReportSource(reportSource);
viewer.setEnterpriseLogon(enterpriseSession);
viewer.setOwnPage(true);
viewer.setName("View Report");
viewer.processHttpRequest(request, response, getServletContext(), null);
viewer.dispose();
Did i miss something ?
Thanx
Ivan.