I am trying to pass multiple values to a crystal report using java and jsp pages. I can get it working using single values but I need to pass multiple values that are comma delimited or something along that line. I pass a toDate a fromDate and userName. I need multiple userNames to be able to filter though by all the user names(works with jsut one user right now). I guess im not sure how the default crystal reports prompt saves multiple variables because i cannot mimic it.
example: (user1, user2, user3) instead of just (user1).
Thanks for your time.
From the search.jsp page i get values and send them to eReport.jsp to generate the report
String fromDate = request.getParameter( "fromDate" );
session.setAttribute( "fromDate", fromDate );
String toDate = request.getParameter( "toDate" );
session.setAttribute( "toDate", toDate );
String userName = request.getParameter( "user" );
From search.jsp it sends the values to the eReport.rpt
which just prepares the variables for generation.
//gets session variables
String startDate = (String)session.getAttribute("fromDate");
String endDate = (String)session.getAttribute("toDate");
String userName = (String)session.getAttribute("userName");
missing code....
// fromDate
ParameterField parFromDate = new ParameterField();
parFromDate.setReportName("");
parFromDate.setName("fromDate");
Values valsFromDate = new Values();
ParameterFieldDiscreteValue valFromDate = new ParameterFieldDiscreteValue();
valFromDate.setValue(fromDate);
//valFromDate.setValue("2011-1-1");
valsFromDate.add(valFromDate);
parFromDate.setCurrentValues(valsFromDate);
fields.add(parFromDate);
//out.println("parFromDate: " + parFromDate.toString());
etc for all variables...
Picture to show what i am trying to accomplish