Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CR9 CRYSTALREPORTSVIEWER

Status
Not open for further replies.

ggeorgiou

Programmer
Oct 19, 2001
12
CY
I have tried to use the CR 9 version of the winforms Crystal Reports viewer and I have a problem with the dialog that asks for the parameter values. Instead of presenting in one box all the parameter names so that the user selects each time the one that he wants to supply new value(s), the dialog simply sequences from first to last parameter, one at a time, so that,for example, if you have a report with 30 parameters, to which you only need to give values other than the default ones assigned in the report definition, you still have to step through all 30 parameters from first to last.

Even worse, the parameter dialog fails to show the default parameter description or use the deault value assigned in the report.

Am I doing something wrong. I find it difficult to believe that the people who developed Crystal Reports 9 could have gone from a reasanbly good parameter dialog in the viewer (as in 8.5 and in the CR 9 devlopment system) to a really daft one.

George Georgiou
 
Yes, all of Crystal's parameter entry screens -- from the Admin console to the html report viewer -- suck. Crystal Decisions programers just seem to have no idea how to handle this problem neatly (remember the years of telling users to enter dates as "Date(yyyy,mm,dd)"?)

You're stuck writing your own screen in CSP/javascript.
 
This is the same problem I am having. I would like all the parameters to display into one box that they can choose which parameters they would like to enter. Did you ever get this problem handled? Help!!!
 
George,

Is there any reason why can't write your own dialogue to prompt for the parameters, and then feed them to your report object programmatically. If you do that, the user won't see the built-in dialogue.

I won't try to give you any code for this because I don't know what programming language you are using. But, in general, you can programmatically set the parameters by accessing the ParameterFields collection of the report object.

Each object in that collection has an AddCurrentValue method, which does what its name suggests. Or, where the parameter accepts a range of values, you can use its AddCurrentRange method.

Does that help at all?

Mike


Mike Lewis
Edinburgh, Scotland
 
Thanks. I have accessed the ParameterFields collection but now I am trying to get those values from the list box and feed them into the report. My problem now is trying to get all of the discrete values (multiple or single) from the list box to the AddCurrentValue collection. I am new to all of this and the language I am using (C#). How can I get it to loop through all of the values in the list box and plus those into to parameters of the report. Any help would be helpful.
 
CCGRob,

What listbox are you referring to? Do you mean the one that CR displays when it prompts for parameters?

If so, I can't see why you should even need to look at it. The point of using the ParameterFields collection is to avoid having to use the listbox or any other aspect of the prompt.

If you mean some other listbox -- one that your C# program is displaying, perhaps -- then that's not really a CR issue. Perhaps you could clarify.

Mike


Mike Lewis
Edinburgh, Scotland
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top