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.