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!

Conditional Record Selection

Status
Not open for further replies.

simrei77

Technical User
Nov 8, 2002
1
US
Hello,

I'm new to Crystal and I have a question about Record Selection.

I'd like to select records depending on the column respectively the 'fieldname'.
i.e. for the first column select these records, but for the second column select other records and so on.

A check on the field/object name would help me out, but I think this is not existing in Crystal.
i.e.
if fieldname = field1 //for first column
then (select records)
else if fieldname = field2 //for second column
then (select other records)

Is there a way around?

I'd appreciate any help.

Thank you very much.
Simone
 
Your needs are a bit unclear...

Crystal treats all data sources akin to a single table.

You can use multiple columns in the record selection, but you cannot have multiple data sources as a result.

Here's an example of 2 fields used in a record selection criteria:

{MyTable.MyStartDate} > currentdate-1000
and
{MyTable.MyEndDate} < currentdate-100

You can suppress values within a report, so build all of the data you need, and if you want to NOT display some fields, suppress them accordingly.

There are tricks to do just about anything, you'll be best served here by supplying examples of your data, and desired output.

-k kai@informeddatadecisions.com
 
It sounds like conditional columns are what you are looking for.

In record selection, make your criteria wide enought to get ALL the data you need for ALL the columns.

For each column, use an If.. then.. else... formula to count or accumulate the data you want.

Works great with ThisMonth/NextMonth/Thisyear/ type reports. Editor and Publisher of Crystal Clear
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top