Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Viewing Report Instance.

Status
Not open for further replies.

kitt76

Programmer
Nov 19, 2002
2
GB
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top