Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
|
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 2nd, 2005, 01:27 AM
Registered User
 
Join Date: Sep 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default JSP passing parameter to CR10

Hi everyone, i'm newbie to CR, now trying to use JSP to create CR.
I created a report in using CR10, n there is a parameter that determine which column to be sorted. It is running fine in CR. But when i pass the parameter from JSP to CR, it did not run as expecetd, it simply has no effect at all.

My JSP coding is as follow:

String path = "/Report3.rpt";
Fields fields = new Fields();

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

pfield1.setName("SortOrder");
pfieldDV1.setValue("C");
vals1.add(pfieldDV1);
pfield1.setCurrentValues(vals1);
fields.add(pfield1);

IReportSourceFactory2 rsf = new JPEReportSourceFactory();
IReportSource rptSource = (IReportSource)rsf.createReportSource(path,request .getLocale());
CrystalReportViewer viewer = new CrystalReportViewer();
viewer.setReportSource(rptSource);
viewer.setParameterFields(fields);
viewer.setEnableParameterPrompt(true);
viewer.refresh();
viewer.processHttpRequest(request, response,getServletConfig().getServletContext(), out);
viewer.dispose();


--------------------------------
The SortOrder parameter have three values: I, R, C...

Anyone with some idea or suggestion please reply here, or send mail to [email protected]







Similar Threads
Thread Thread Starter Forum Replies Last Post
passing parameter sarah lee ASP.NET 1.0 and 1.1 Basics 3 September 5th, 2006 04:29 PM
passing parameter from js to another jsp page. Regornil JSP Basics 1 August 31st, 2004 08:23 AM
passing parameter.. suzila VB.NET 2002/2003 Basics 7 May 17th, 2004 08:28 PM
Parameter passing psambor Beginning PHP 0 September 17th, 2003 01:47 AM
Passing Parameter tgopal Javascript 3 August 7th, 2003 07:54 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.