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

Compiled Report and selection Criteria

Status
Not open for further replies.

BHERNANDEZ

Technical User
Mar 4, 2003
24
US
Using Crystal V 7 with a SQL database. I have compiled reports, but when running the executable, the selection criteria only shows one selection when I need two. For example:

A cancelled order report shows items with an audit action of "D". (This is in my selection criteria) I also need to specify a specific order number(s). When running the compiled report, I am only allowed to modify the audit action code.

This is pretty new to me. how can I change this to allow me to specify which order numbers I want to view?

Bridget
 
If you mean using the existing compiled report, you might be able to manually insert the criteria into the record selection formula, but you'd need to know the name of the field you wish to add criteria for.

Noite the format and syntax used in the existing criteria/filtering.

The best bet might be to create another compiled report which has parameters.

-k
 
Thanks for this info. I was wanting to modify the existing report so that I could re-compile it and have those parameters available to use. You said create another one with parameters? I followed (or thought I did) the steps listed in the help guide. Is this what you are talking about?

Bridget
 
Bridget,

Did you create a parameter for Order Number? If so did you modify the record selection formula to look at only those order numbers?

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
Don,

I had been opening the report in Crystal and modifying my selection criteria as far as the order #'s go. I thought if I compiled it, I would be able to select the order # the same way it asks for an audit action. How do I set a parameter? This is something I've not done. (I will be on vacation starting tomorrow until next Friday the 16th) So, if you don't hear back from me today, I will reply then.

Bridget
 
What do you mean by "set a parameter"?

You have created the Order_No parameter have you not?

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
Okay, maybe I am being dense, but I created the report. I use the selection criteria to select which orders I want to look at. Sometimes I want to look at three others times it may be 10. When I compiled the report all I was able to set for parameters when running the executable was the audit action.

BRidget
 
OK. I forget which version of

Open the report in the crystal report designer. Click on insert, field object, parameter field, right click and create a new parameter field. (This may be a little different if you are on an older version of Crystal).

Call the parameter field {?OrderNo}, and make it a multi-value parameter.

Then edit your record selection formula to read:

{OEORDHDR_SQL.Order_no} in {?OrderNo} and
<<Insert the rest of your record selection here>>

Recompile the report. Thats it. At this point when you run the .exe you should be prompted for what order numbres you want on the report. Enter as many as you like and the report should work fine.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
This would also apply to the Action field.

If the users have been modifying the record selection formula, convert the record selection formula to use a parameter for it as well.

Prior to saving/compiling the report check the Database->Show SQL Query to assure that the criteria entered in the parameters are reflected in the SQL being generated, that way you'll get better performance.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top