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!

Default data tabs for select expert

Status
Not open for further replies.

TedBienk

Programmer
Mar 8, 2003
3
GB
When clicking on Select Expert, using Crystal Reports, is there anyway I can declare several data objects as defaults with (is any value) if the data object is empty and had not been selected previously.
 
Try posting some basic environment info, such as:

Crystal version
Database used
Example data
Expected output

The Select Expert is the wizard for the Report->Edit Selection Formula->Record

Using the non-wizard method allows you to code for just about anything, and were you to describe intent instead of questioning characteristics of the Select Wizard someone will likely find a solution for you.

Perhaps you want a parameter (Insert->Field Object-Right click parameters and select New). Then you can set a default value for the parameter and check for it's value in the record selection formula, opting to not pass any criteria for the default.

Here's an example of setting a string parameter default to "all":

(
If {?MyStringParameterChoices} <> "All" then
{table.field} = {?MyStringParameterChoices}
else
If {?MyStringParameterChoices} = "All" then
true
)

Note the use of parentheticals and fully qualifying and disqualifying the conditional. This is done to assure SQL pass through so that the database does the work (check the Database->Show SQL Query to see what is being passed).

-k
 
I am using Crystal version 8 and I am going to upgrade to version 10. I am using an ACCESS database and I have 50 fields that I use in my report. When I click on Select Expert and then select new, Select Expert displays my field tree, with 50 fields to select from. Is there anyway to limit or order the fields in the field tree?

I would appreciate any help.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top