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

Select Expert Parameter Question

Status
Not open for further replies.

Pdle80

Technical User
May 8, 2011
2
Hi.

I'm new to Crystal and currently stuck getting the Select Expert to work correctly. I am using Crystal 9 and MS SQL Server 2008 on the backend. My report is based off of a View.

I created 5 new parameters for my report and also created 5 new formulas to make the parameters equal to a particular database field. I want it so that the user can enter one of the 5 parameters and have the data filtered based on that parameter. They can leave the other parameters blank.

I go to select expert and tried created a formula like this:
{@formula1} or {@formula2} or {@formula3} or{@formula4} or {@formula5}

This doesn't seem to bring in the data correctly for the report. Can anyone suggest another method to accomplishing this?

Thank you!
 
Hi,
What are those formulas?



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Turkbear,

{View.field1} = {?parm1}

{View.field2} = {?parm2}

{View.field3} = {?parm3}

{View.field4} = {?parm4}

{View.field5} = {?parm5}
 
Your method is not very efficient as query will bring all data back from database and process within Crystal. So as database grows report will run slower and slower.

Why not just use your parameters in the select expert directly

({View.field1} = {?parm1} or
{View.field2} = {?parm2} or
{View.field3} = {?parm3} or
{View.field4} = {?parm4} or
{View.field5} = {?parm5})

Alternatively if you have a single view, use the SQL from your view to build a Command. You can then use parameters inside the command. They are different parameters to report parameters so you will need to delete those firts and then recreate in the command dialogue box.

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top