Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Crystal Reports and Parameter passing? Post Reply Post New Topic
Author Message
John
Newbie
Newbie
Avatar

Joined: 26 Feb 2007
Location: United States
Online Status: Offline
Posts: 2
Quote John Replybullet Topic: Crystal Reports and Parameter passing?
    Posted: 26 Feb 2007 at 7:30am
Hello there, first I wish you luck on the new forum's, I hope they work out nicely!
 
I do have a question about parameterized reports with Crystal Reports that comes with VS2005 pro.
 
I need to develop reports that can have a variable number of parameters set in them.  I would like to give my users the ability to set or not set a finite list of parameters, but I'm not sure if this can be done easily.
 
So, I guess my real question is, if I create  parameter fields for a report, and do NOT populate them, will this cause me problems?  I'd try it out, but unfortunately, I don't have time right now to fit this testing in (but I have time to write a post about it! :) )
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 26 Feb 2007 at 10:26am
Well, unfortunately we are in the same boat. I never thought about optional parameters and thus haven't tried it before. It's an interesting idea though. Rather than not populate them, I would assign dummy values to the unused ones. Then if you need to, in your report logic check for the dummy values and act accordingly.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
John
Newbie
Newbie
Avatar

Joined: 26 Feb 2007
Location: United States
Online Status: Offline
Posts: 2
Quote John Replybullet Posted: 26 Feb 2007 at 1:35pm
Something I just read somewhere a few hours ago sounds very interesting.
 
Create a class to represent your data (like Employee or something like that). Then generate a list (or some enumerable type) of your Employee class.  Then bind the report to THAT list.
 
In this way, I would imagine that building the list is where you could have all of your parameters.  The only issue that I could see with this method is that you are potentially storing a considerable amount of information in memory to display the report? 
 
hmm
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 26 Feb 2007 at 2:56pm
I don't think that answers your question. Binding to a custom class is really talking about using that class as your data source. Thus, your report prints the data from that class instead of from a database. The parameter collection isn't involved here at all.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.008 seconds.