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 July 29th, 2003, 10:25 AM
Registered User
 
Join Date: Jul 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Sending over a sorting parameters

I was wondering how to send a parameter that deals with the sorting and/or grouping of the report. Thanks for the help.
 
Old September 2nd, 2005, 01:57 AM
Registered User
 
Join Date: Sep 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm having the same problem too... does any one here can provide soem solution or guidelines?

 
Old September 4th, 2005, 05:14 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

u can easily set a group or Sort Item among ur Data Fields.

Always:),
Hovik Melkomian.
 
Old September 4th, 2005, 07:53 PM
Registered User
 
Join Date: Sep 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I had set a sorting parameter in crystal report that when i refresh, i will be prompted for the parameter values...
But now i had to pass a parameter from jsp to crystal report, so that it dynamically sorted the report with different colunms each call...
do you familiar with jsp and CR10?

 
Old September 4th, 2005, 07:58 PM
Registered User
 
Join Date: Sep 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I actually had created the same from the sample code from crystal report official page, but the parameter passed into CR did not take any effect that changes the outcome.... here the partial from my jsp code:

String userName = "";
String passWord = "";
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();

/*create the connection infos object and set the user name and password
  to the report*/
  ConnectionInfos connInfos = new ConnectionInfos();
  IConnectionInfo connInfo1 = new ConnectionInfo();
  connInfo1.setUserName(userName);
  connInfo1.setPassword(passWord);

  //add the IConnectionInfo object into the ConnectionInfo collection
  connInfos.add(connInfo1);

  //set the connectioninfo into the viewer
  viewer.setEnableLogonPrompt(false);
  viewer.setDatabaseLogonInfos(connInfos);
viewer.setReportSource(rptSource);
viewer.setParameterFields(fields);
viewer.setEnableParameterPrompt(true);
if (session.getAttribute("refreshed") == null)
{
    viewer.refresh();
    session.setAttribute("refreshed", "true");
}
viewer.processHttpRequest(request, response,getServletConfig().getServletContext(), out);
viewer.dispose();






Similar Threads
Thread Thread Starter Forum Replies Last Post
sorting parameters rushman XSLT 3 October 20th, 2007 07:20 AM
Sorting sunny76 Excel VBA 2 September 19th, 2005 09:31 PM
Sending parameters to a stand-along javascript wmacomber Javascript How-To 1 May 11th, 2005 09:50 AM
Datagrid sorting by non alphabetical sorting? LLAndy VS.NET 2002/2003 1 July 15th, 2004 01:20 AM
Sorting? pbernardo XSLT 2 October 27th, 2003 11:34 AM





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