Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JSP & Crystal Reports Export Problem

843836May 2 2005 — edited Nov 16 2005
Hi there,

I have a problem about printing a report from web viewer.

I can see report in explorer without any problem. And also when click export still there is no problem. But after selecting the export type and page range it gives an error like this :
com.crystaldecisions.report.web.viewer.CrystalReportViewer 
Some parameters are missing values 
I am passing some parameters to the report. If I try to export a report which does not have parameters than it works fine. But there is a problem with parameters. Should I put the parameters to the session ????

This is my JSP content.
			IReportSourceFactory2 rptSrcFactory = new JPEReportSourceFactory();
			IReportSource reportSource = (IReportSource) rptSrcFactory.createReportSource("helloWorld.rpt", req.getLocale());
			req.getSession().setAttribute("rptSource",reportSource);
			viewer.setReportSource(reportSource);
			
			ParameterFieldDiscreteValue dv = new ParameterFieldDiscreteValue();
			dv.setValue("try1 value");
			dv.setDescription("try1 description");
			
			Values vals = new Values();
			vals.add(dv);
			
			ParameterField pf = new ParameterField();
			pf.setName("try1");
			pf.setReportName("");
			pf.setCurrentValues(vals);
			
			Fields fields = new Fields();
			
			fields.add(pf);
			
			viewer.refresh();
			viewer.setOwnPage(true);
			viewer.setHasExportButton(true);
			viewer.setHasPrintButton(true);
			viewer.setDisplayGroupTree(false);
			viewer.setParameterFields(fields);
			viewer.processHttpRequest(req, res, context, res.getWriter());
			viewer.dispose();
If you have any idea, please let me know.

Thanks in advance.

Ismail TURK.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 14 2005
Added on May 2 2005
20 comments
1,025 views