Skip to Content
0
Former Member
Aug 05, 2008 at 01:10 PM

Some parameters are missing values

301 Views

I am trying to invoke a crystal report using JRC API. I am using Business Objects XI.

When I try to invoke the report after setting all parameters I am getting an error message "Some parameters are missing values ". Here is how my JSP code looks like

ReportClientDocument oReportClientDocument = new ReportClientDocument();

oReportClientDocument.open(reportName, 0);

CrystalReportViewer oCrystalReportViewer = new CrystalReportViewer();

//set the reportsource property of the viewer

oCrystalReportViewer.setReportSource(reportSource);

//set viewer attributes

oCrystalReportViewer.setOwnPage(true);

oCrystalReportViewer.setOwnForm(true);

//set the CrystalReportViewer print mode

oCrystalReportViewer.setPrintMode(CrPrintMode.ACTIVEX);

//refresh the CrystalReportViewer if necessary (only required once)

if (session.getAttribute("refreshed") == null)

{

oCrystalReportViewer.refresh();

session.setAttribute("refreshed", "true");

}

String userid="emagia";

String password="emagia";

String rptuserid="tjordan";

String fromdate="07/01/2008";

String todate="07/12/2008";

ConnectionInfo ci = new ConnectionInfo();

ci.setUserName(userid);

ci.setPassword(password);

ConnectionInfos connections = new ConnectionInfos();

connections.add(ci);

oCrystalReportViewer.setEnableLogonPrompt(false);

oCrystalReportViewer.setDatabaseLogonInfos(connections);

ParameterFieldDiscreteValue val1 = new ParameterFieldDiscreteValue();

val1.setValue(rptuserid);

Values vals1 = new Values();

vals1.add(val1);

ParameterField param1 = new ParameterField();

param1.setName("User Id");

param1.setReportName("");

param1.setCurrentValues(vals1);

Fields fields = new Fields();

fields.add(param1);

ParameterFieldDiscreteValue val2 = new ParameterFieldDiscreteValue();

val2.setValue(fromdate);

Values vals2 = new Values();

vals2.add(val2);

ParameterField param2 = new ParameterField();

param2.setName("Date Range from");

param2.setReportName("");

param2.setCurrentValues(vals2);

fields.add(param2);

ParameterFieldDiscreteValue val3 = new ParameterFieldDiscreteValue();

val3.setValue(todate);

Values vals3 = new Values();

vals3.add(val3);

ParameterField param3 = new ParameterField();

param3.setName("Date Range To");

param3.setReportName("");

param3.setCurrentValues(vals3);

fields.add(param3);

oCrystalReportViewer.setEnableParameterPrompt(false);

oCrystalReportViewer.setParameterFields(fields);

oCrystalReportViewer.processHttpRequest(request, response,getServletConfig().getServletContext(), null);

oCrystalReportViewer.dispose();

In the Tomcat log this is what I get

- JRCAgent3 received request: refreshData

- JRCAgent3 attempting to acquire license

- JRCAgent3 successfully acquired license

- JRCAgent3 releasing license

- JRCAgent3 received request: getPromptConnInfos

- JRCAgent3 received request: compoundRequest

- JRCAgent3 received request: setSQLLogonInfoRequest

- JRCAgent3 received request: setSQLLogonInfoRequest

- JRCAgent3 received request: fetchReportPageRequest

- JRCAgent3 attempting to acquire license

- JRCAgent3 successfully acquired license

- Logon: Connecting to database using local JNDI server ...

- Connection Opened null

- Connection opened (Connection: databaseType=JDBC serverName=reports_dsn.dsn state=open databaseDriverName=crdb_odbc.dll).

- Report parameters is not valid

- Report parameters is changed

- Handling report parameters changes

- Validating report parameters

- com.crystaldecisions.reports.dataengine.l: Some parameters are missing values

- The report requires parameter values that need to be supplied by the client before further processing

com.crystaldecisions.reports.dataengine.l: Some parameters are missing values

at com.crystaldecisions.reports.dataengine.j.a(Unknown Source)

at com.crystaldecisions.reports.dataengine.a9.a(Unknown Source)

Can anybody tell me why I am getting this error??

Any help will be appreciated.