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!

Conditionally Display a Field

Status
Not open for further replies.
Aug 16, 2002
20
US
I created a report that displays information on a certain list of people. I need to display some odd information like birthday and office extension #. This information is kept in a table for account notes. In this table there is a code type and a code value. A type would be "B-DAY" or "EXT" and the value corresponds to the type. Per name I want to display the birthday and ext if there is one. I wrote a formula to display the code value if the code type is "B-DAY", but the problem is that is creates a record for every code type even though it doesn't display the code value. Any idea how to fix this? My knowledge of Crystal Reports is limited so it may be something simple.
 
Horrid database design!
You'll need to create a subreport for each item you want to display. ie one for birthday, one for extension.
The subreport will need to be placed in the same section as the rest of the user details.
It'll be slow but it will work. Andrew Baines
Chase International
 
Try doing the following.

In the select expert do the following
{field.type} in ["B-Day","EXT"]

Remember to left join when linking from the main table to the table containing the birthday and extension information.

if the customer has no birthday date or extension then only the main table information will be given.
If the customer has both types then the customer will have two records.
if the customer has only one of the type then only one record will be given.

You can then play around with the suppress function,
group on customer ,
or overlay the detail section to fix up your report as you would like to see it.

I hope this is of some help.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top