Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Multiple selection conditions- order Post Reply Post New Topic
Author Message
Just
Newbie
Newbie


Joined: 21 Feb 2012
Online Status: Offline
Posts: 18
Quote Just Replybullet Topic: Multiple selection conditions- order
    Posted: 22 Feb 2012 at 12:20am
I have a report with 4 tables (Category, SRZ,TraNag, VatNag, in Database expert, last 3 are connected with full outher join with Categoryid. The report is grouped by categoryid. SRZ,TraNag, VatNag are bound by date in select expert ( date in range). If there is a document in that range it shows category id and another field from one or all 3 remainging tables. I would like the report to show all records that give answer in the given date range. So far First date range in TraNag is checked and then if it is true the following two date ranges are checked.
If I add a new Category id and a docuemt e.g. in SRZ it does not show me the record even though the date range condition is true.

Is there a way to have conditions in the select expert written so that no matter which table has a racord in the given date range  it shows the record from table /s . Not only if TraNag has the condition evaluated as true.

Hope that without select expert conditions somebody can give me the answer.If no I can provide those
IP IP Logged
rkrowland
Senior Member
Senior Member
Avatar

Joined: 20 Dec 2011
Location: England
Online Status: Offline
Posts: 259
Quote rkrowland Replybullet Posted: 22 Feb 2012 at 1:03am
Create a formula as follows;
 
@Select:
if (
 ({tranag.datefield} >= STARTDATE and {tranag.datefield} <= ENDDATE)
or
 ({srz.datefield} >= STARTDATE and {srz.datefield} <= ENDDATE)
or
 ({vatnag.datefield} >= STARTDATE and {vatnag.datefield} <= ENDDATE)
)
then
TRUE
else
FALSE
 
Then perform your record selection on this formula, ie;
 
{@Select} equal to TRUE
 
Regards,
Ryan.
 
IP IP Logged
Just
Newbie
Newbie


Joined: 21 Feb 2012
Online Status: Offline
Posts: 18
Quote Just Replybullet Posted: 22 Feb 2012 at 2:12am
Does it matter in which order I put them? Stil if I add new cathegory ID it stops checking on first condition being true.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 22 Feb 2012 at 3:37am

likely the issue is that you are evaluating Nulls.

If your formula option or report options are not set to handle nulls then the formula will stop evaluating when it hits the null (which acts the same as a false in the select expert).
if you are using Ryan's suggestion and you have a formual field with to return a T/F on the 3 date ranges change that formula field to use  the option of 'use default values for nulls' and palce it on your report canvas to see if you get TRUE and FLASE on each row as you wanted it to.
 
your statement would be similar to Ryans suggestion.


Edited by DBlank - 22 Feb 2012 at 3:38am
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.