How to avoid the parameters accepting screen generated by cr

Hi,

I am working on the crystal report x1. with that tool I designed one rpt file which will accept one parameter.
To run this file I had written one servlet. Here I am getting one problem i.e I am setting report parameter to the engine , but instade of getting the output I am getting one jsp view which is having one text feilt to accept the report parameter , once I submit that form with some value I am getting required output , here I dont want to get that extra page generated byt the reporting engine. what I have to do for this. One more thing here if I did not pass any parameters to reporting engine also it was showing that page and allowing to get the required output

here I am placing my code.

ReportClientDocument reportClientDocument = new ReportClientDocument();
CrystalReportViewer viewer = new CrystalReportViewer();
ReportExportControl exportControl = null;
ServletContext cxt = req.getSession().getServletContext();
String fileName = “C:/Documents and Settings/Administrator/Desktop/lib-so/ix_sample2.rpt”;

try
{
String realPath = fileName;
reportClientDocument.open(realPath, 0);
viewer.refresh();
viewer.setReportSource(reportClientDocument.getReportSource());
}
catch(Exception e)
{
System.out.println(“inside catch block…”);
e.printStackTrace();
}
IReportSource reportSource = reportClientDocument.getReportSource();
Fields oFields = new Fields();
ParameterField portfolio = new ParameterField();
portfolio.setName(“Portfolio”);
Values oValues = new Values();
ParameterFieldDiscreteValue oParameterFieldDiscreteValue = new ParameterFieldDiscreteValue();
oParameterFieldDiscreteValue.setValue(new Integer(16));
oValues.add(oParameterFieldDiscreteValue);
portfolio.setCurrentValues(oValues);
portfolio.setReportName(fileName);
oFields.add(portfolio);

viewer.setName(“admin”);
viewer.setOwnPage(false);
viewer.setParameterFields(oFields);
try {
viewer.processHttpRequest(req, res, cxt, res.getWriter());
viewer.dispose();
}
catch (ReportSDKExceptionBase e) {
e.printStackTrace();
}

Please help me in this .
thanks ,
Mallikarjuna


mallikarjuna (BOB member since 2009-05-17)

Im sure theres a boolean "showprompt" property somewhere that you can se in the API. I know its there in the old VB and .Net SDK`s.


ABILtd :uk: (BOB member since 2006-02-08)

This is a snippet from our jsp launcher which passes parameters. The reports just launch the user never sees the crystal parameters screen.

// Create list of parameters, including names, values, and if they are required
Vector params = new Vector(5);
params.addElement(new ReportParameter("{?where}", where, true));
setParameters(clientDoc, params, locale, messages, reportName);


BDeLong (BOB member since 2008-01-15)