Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 29th, 2003, 10:25 AM
Registered User
 
Join Date: Jul 2003
Location: Ebensburg, PA, USA.
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.
Reply With Quote
  #2 (permalink)  
Old September 2nd, 2005, 01:57 AM
Registered User
 
Join Date: Sep 2005
Location: , , .
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?

Reply With Quote
  #3 (permalink)  
Old September 4th, 2005, 05:14 AM
Friend of Wrox
Points: 3,558, Level: 25
Points: 3,558, Level: 25 Points: 3,558, Level: 25 Points: 3,558, Level: 25
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: California, USA
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.
Reply With Quote
  #4 (permalink)  
Old September 4th, 2005, 07:53 PM
Registered User
 
Join Date: Sep 2005
Location: , , .
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?

Reply With Quote
  #5 (permalink)  
Old September 4th, 2005, 07:58 PM
Registered User
 
Join Date: Sep 2005
Location: , , .
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();

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 12:58 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.