Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 584
  • Last Modified:

Crystal Reports 2008 Parameters

I am trying to create a report (Crystal 2008) that is based of a stored procedure. The procedure has 3 parameters. One string and 2 dates (start/end). The string should parameter needs to be a dynamic list so I've created a view to populate it. Given this I have 2 datasources...the procedure (that the report will be based on) and the view which populates the string parameter list. The problem is that the populating of the string parameter is very irratic. Sometimes the string parameter's list is populates and shows a drop-down selection and then other times it shows as simply a text box entry with no list at all. I'm not sure how to phrase the question other than "has anyone seen this erratic behavior with Crystal Reports 2008? Is there something simple I could be overlooking?" Thanks for any suggestions!
0
brianwells05
Asked:
brianwells05
  • 4
1 Solution
 
brianwells05Author Commented:
This seems to happen when I have more than 1 view selected as a datasource, then at least one paramater looking to each view as it's dynamic pick list...hope this helps. When more that 1 datasource is used I can only get a drop down for 1 pick list parameter and no more.
0
 
brianwells05Author Commented:
This doesn't occur if I create a report with 4 datasources (1 - table, 2/3/4 - views). The dynamic pick lists work fine, but if the first datasource is a stored procedure instead of a table it goes crazy. Not sure if using a mixture of parameters from a stored procedure and self defined is not allowed or what. But if the report is based on a stored procedure the dynamic parameter pick lists go completely random.
0
 
Kurt ReinhardtCommented:
For the sake of clarification, you have 3 input parameters in your proc and you modified the properties of one of them to be dynamic?  If not, did you create a parameter in Crystal Reports (external to the proc) and you're trying to pass it into the proc?

When you base a report off a stored procedure, the stored procedure must execute fully and return data before any Crystal Reports functionality can be executed (Crystal Reports parameters, for example, or the View being queried).

Depending on how you built the parameter, solutions might be different.

~Kurt
0
 
brianwells05Author Commented:
For simplicity you can take the same example with 2 parameters (1 from the stored procedure, 1 built in crystal). Now you have 3 datasources; the stored procedure, then 2 views. The views are used to populate each of the parameters dynamic pick lists and the procedure results are for the report results. Does this make more sense? It is impossible for me to get both parameters pick lists populated. One will default to a drop down list and the other will remain a text box entry...and there is no logical explanation as to which parameter will show up as a list or text entry...very confusing? As for your earlier comment, shouldn't the views be executed before the stored procedure since they are used for the drop down lists and the procedure results are needed until the parameters are passed to it?
0
 
brianwells05Author Commented:
I figured it out...their were multiple datasources selected to populate the dynamic parameters. By default, Crystal was creating primary key links to the datasources which filtered the list before the parameter prompt. Seems obvious now....
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now