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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Reports 2013 dynamic parameter filter

Status
Not open for further replies.

hmax

Programmer
Jan 22, 2012
60
0
0
US
Crystal Reports 2013
Oracle - using Command in Crystal to retrieve dataset

1. In a dynamic parameter, when we choose to filter on the available values, is there a way to use a wildcard?

I've tested in the Record Selection Criteria where
table.field = {?parameter}
table.field like {?parameter} + "*"
table.field startswith {?parameter}

Should I, instead, use a wildcard at the level of the dynamic parameter filter, and if so, how is this done?

2. Results are always the same, whether I use "=", "like [...] + '*'", or "startswith". Therefore, is the dynamic parameter processing the results during a different "Pass" of the data?
I have not found any documentation online about this.

Thank you.

 
Is the dynamic parameter based on the command that provides the data for the rest of the report? If so, that means that you're not using the parameter in the "where" clause of the command, which will cause your report to be slow. See my blog post here for more information about using commands:
What I do when I need dynamic parameters in a report where I've used a command (and I almost always use commands!) is one of two things:

1. If the data for the parameter is in a single table, I add that table to the report without linking it to anything.

2. If the data has to come from joined tables or has specific filters that are always used, I'll write a command, again without linking it to anything.

NOTE: When you add a table or command to a report without linking it, Crystal will throw a warning stating that this is "generally not supported", but in this situation it works.

3. Use the data from the new table or command to provide data for the prompt only. Do NOT use any fields elsewhere on the report - this is just for providing the values for the dynamic prompt.

-Dell

DecisionFirst Technologies - Seven-time SAP BusinessObjects Solution Partner of the Year
 
Thanks, Dell. I will try your suggestion of adding a separate, unlinked lookup table solely for the purpose of the dynamic parameter. I appreciate your feedback.
I've used mostly stored procedures and views for Crystal, pushing everything out to the database for performance purposes; it's been a while since I've seen the use of Commands.

Still, the two questions remain, though, concerning the use of like/wildcard/startswith and the results presented -

1. In a dynamic parameter, when we choose to filter on the available values, is there a way to use a wildcard?

I've tested in the Record Selection Criteria where
table.field = {?parameter}
table.field like {?parameter} + "*"
table.field startswith {?parameter}

Should I, instead, use a wildcard at the level of the dynamic parameter filter, and if so, how is this done?

2. Results are always the same, whether I use "=", "like [...] + '*'", or "startswith". Therefore, is the dynamic parameter processing the results during a different "Pass" of the data?
I have not found any documentation online about this.

Best,
hmax

 
I've not used wildcards with parameters, so that's not something I can help you with. You might want to start a second thread with just that question.

Sorry!

-Dell

DecisionFirst Technologies - Seven-time SAP BusinessObjects Solution Partner of the Year
 
No, problem, Dell. Thanks so much for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top