Print Page | Close Window

Different record selection on same table column

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=1524
Printed Date: 02 May 2024 at 11:33am


Topic: Different record selection on same table column
Posted By: filipz
Subject: Different record selection on same table column
Date Posted: 17 Oct 2007 at 4:22pm
Hi

I have a problem with filtering data when filtering is used on same table column but with different conditions.

For example I have tables

Produkt = {ProduktID,ProduktName,...}
Actions = {ProduktID, ActionID,ActionName,...}

One product can have more different actions.

I have one group grouped by ProduktID.

I would like to write report something like this:
This is written in Details Section

"TextObject1: "   Actions.ActionName //if ActionID=150
"TextObject2: "   Actions.ActionName //if ActionID=160

But when I use selection expert in first row and add condition Actions.ActionID is 'equal to' 150 and then Actions.ActionID is 'equal to' 160 in second row it doesnt show anything in Details Section.

I have tried to use this conditions on different formula like this:
   "TextObject1: "   formula1
"TextObject2: "   formula2
where formula1 and formula2 = {Actions.ActionName} but it doesnt help.

Thanks.



Replies:
Posted By: hilfy
Date Posted: 21 Oct 2007 at 9:20am
You need to use Actions.ActionID is 'equal to' 150 or then Actions.ActionID is 'equal to' 160.
 
If you use "and", it looks for your ActionID field to be equal to both 150 and 160 at the same time, which is impossible.  So, you don't get any data in your report.
 
If you use "or", it looks for your ActionID field to be either 150 or 160, which should show the data that you want.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics



Print Page | Close Window