Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Assistance in creation of report Post Reply Post New Topic
Page  of 2 Next >>
Author Message
jordanofmn
Newbie
Newbie


Joined: 06 Apr 2010
Online Status: Offline
Posts: 10
Quote jordanofmn Replybullet Topic: Assistance in creation of report
    Posted: 06 Apr 2010 at 7:37am
I have a ctree database I am working with in the health care field. I am trying to create a report based on a condition, which I do not want to appear on the report (ie. use the presence of the condition as a filter), and then return values from other tables to the report. Possible? Thankx
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 06 Apr 2010 at 9:07am
Yes you should be able to go into the select expert and filter on a condition.
IP IP Logged
jordanofmn
Newbie
Newbie


Joined: 06 Apr 2010
Online Status: Offline
Posts: 10
Quote jordanofmn Replybullet Posted: 06 Apr 2010 at 9:27am

I am able to find the value in the select expert, but what I would like to do is to have other selected values returned to the report if the first option is true, but I can not figure out the right formula 

If {tableA.field} = "XXX" then {tableB.field} and {tableC.field) 
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 06 Apr 2010 at 10:51am

I think I understand what you are trying to accomplish, but unless the tables are linked, there would be no way to determine what row(s) to display from tableb and tablec.   If they are linked then the normal record selection should filter the records properly.

IP IP Logged
jordanofmn
Newbie
Newbie


Joined: 06 Apr 2010
Online Status: Offline
Posts: 10
Quote jordanofmn Replybullet Posted: 07 Apr 2010 at 6:18am
The tables can be linked by and id field. I think my issue comes down to the 'and' / 'or' arguements. I am trying to select only records that have a certian condition, and then return a number of other records based on the condition. When I use the select expert it is returning all records if only one of the varibles is present, not just the key variable. The If...then..else statement does not work for me, as it wants a boolean value.
The select expert does not have a 'last date' option is there a way to set up a filter to select the last dated record.
Thanks in advance of any insight,
Cheers 
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 07 Apr 2010 at 6:36am
Unfortunately I am not understanding entirely what you are trying to accomplish.  As far as the 'last date' issue.  Sometimes I can group by the date, and not show the group header or details (just showing the group footer).   I do not know if this will work for you.
IP IP Logged
jordanofmn
Newbie
Newbie


Joined: 06 Apr 2010
Online Status: Offline
Posts: 10
Quote jordanofmn Replybullet Posted: 08 Apr 2010 at 6:03am
Sorry for the confusion. What I am trying to do is to return a set of data with a certian condition met, and with that condition present, a sub set of data returned on the report. For example, out of the the database I want to pick up only the clients that have had a bought a red car, AND for only those clients return the type of radio, engine size, number of doors....
I can not get the IF part to work.
Again, thanks in advance
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Apr 2010 at 6:38am
You do not need the IF. You just choose what fields to display (e.g. type of radio, engine size, number of doors.... ) by placing them on the report canvas. Just because your query returns the field does not mean you have to display it. Same goes for using the field in the select statement. YOu can use it to filter without displaying it.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Apr 2010 at 6:39am
using your example you just say in the select statement
Table.car="Red"
then display the clients and the engine size, type of radio etc.


Edited by DBlank - 08 Apr 2010 at 6:39am
IP IP Logged
jordanofmn
Newbie
Newbie


Joined: 06 Apr 2010
Online Status: Offline
Posts: 10
Quote jordanofmn Replybullet Posted: 08 Apr 2010 at 7:06am
But when I do a select on "RED" I get all records return, but when I try and do a select on "RED" and "SAT Radio" I get no records returned. But If select "SAT Radio" I get record returned. I guess I am trying to do 'anding' and it isn't working
IP IP Logged
Page  of 2 Next >>
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.035 seconds.