Hi,

I am getting an exception 'Some fields are missing values' when trying to display crystal reports in the browser. Some of the reports display properly but some give this error....I have put the "setReportName("") " in the code but still I get the same error :

<%@ page import="com.crystaldecisions.report.web.viewer.*" %>
<%@ page import="com.crystaldecisions.sdk.occa.report.data. *" %>
<%@ page import="com.crystaldecisions.reports.reportenginei nterface.JPEReportSourceFactory" %>
<%@ page import="com.crystaldecisions.sdk.occa.report.repor tsource.IReportSourceFactory2" %>
<%@ page import="javax.naming.*" %>
<%@ page import="javax.sql.DataSource" %>
<%@ page import="java.sql.*" %>


<%
String report = request.getParameter("rptName");
String analysisId = request.getParameter("anlyId");

System.out.println ("report : " + report);
System.out.println ("analysisId : " + analysisId);

Object reportSource = session.getAttribute("reportSource");
if (reportSource == null)
{
IReportSourceFactory2 rptSrcFactory = new JPEReportSourceFactory();
reportSource = rptSrcFactory.createReportSource(report, request.getLocale());
session.setAttribute("reportSource", reportSource);
}

ConnectionInfos connInfos = new ConnectionInfos();
IConnectionInfo connInfo1 = new ConnectionInfo();
connInfo1.setUserName("system");
connInfo1.setPassword("manager");
connInfos.add(connInfo1);


Fields fields = new Fields();
ParameterField pfield1 = new ParameterField();
Values vals1 = new Values();
ParameterFieldDiscreteValue pfieldDV1 = new ParameterFieldDiscreteValue();

pfield1.setName("AnalysisID");
pfieldDV1.setValue(analysisId);
pfieldDV1.setDescription("AnalysisID");

vals1.add(pfieldDV1);

pfield1.setCurrentValues(vals1);
pfield1.setReportName("");
fields.add(pfield1);

CrystalReportViewer viewer = (CrystalReportViewer)session.getAttribute("crViewe r");

if (viewer == null )
{
viewer = new CrystalReportViewer();
viewer.setDatabaseLogonInfos(connInfos);
viewer.setParameterFields(fields);
viewer.setEnableParameterPrompt(false);
viewer.setReportSource(reportSource);
viewer.setOwnPage(true);
session.setAttribute("crViewer", viewer);
}
if (session.getAttribute("refreshed") == null)
{
viewer.refresh();
session.setAttribute("refreshed", "true");
}
viewer.processHttpRequest(request, response,
getServletConfig().getServletContext(), null);
%>

Please can anyone help.

Thanks