Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Conditional display of fields Post Reply Post New Topic
Author Message
Blesid
Newbie
Newbie
Avatar

Joined: 10 Jul 2007
Location: United Kingdom
Online Status: Offline
Posts: 2
Quote Blesid Replybullet Topic: Conditional display of fields
    Posted: 10 Jul 2007 at 7:37am
Hi,
 
I hope someone can help with a little issue I'm having.
 
I am running a report based around the contact trail for our order processing software. It's a log of notes relating to the customer service history of an order. The full data for each of the contacts is made up of a combination of two tables - T_ContactHistory + a table relating to the type of contact it was ( telephone, Email, Letter, Notes etc). I can happily display a list of all contacts, with their contact ID's, the date they were created, the user that created them and the type of contact they are.
 
The problem comes when I want to display the content of the contacts as the body of the contact trail note is stored in the table relating to the contact type and not T_ContactHistory. If I add the "body" field from the telephone table it only then displays those contacts of telephone type. The same applies when I try and add the body filed from any of the other tables.
 
If I add all of the body fields to the report, it then contains no data as it looks for a contact type with a value in each of these fields. This is clearly impossible as the notes are only stored in the relevant body field.
 
So what I would like to do is display a text field if possible that contains some kind of formula to display the body field appropriate to that type of contact. I.e it looks at the contact type and then returns the appropriate body field, otherwise leaves the field blank.
 
Please let me know if this is at all possible as I would like to be able to retrieve a whole history of all contacts raised by a particular user on a particular date.
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 10 Jul 2007 at 12:13pm
 
There are a number of ways to get what you some of what you want. What you may want to try is create a separate data query (command object) in the database designer for each of the tables. Then using the designer create left outer join links from the Customer History table to the individual tables.
 
Once that is done, you could then create a single group using your customer id or whatever field is appropriate. Having done that you could create additional detail sections using the SECTION expert. You should have the same number of detail sections as contact type tables.  Then populate the detail sections appropriately,  that is the email information in one section, telephone in another, etc.
 
This probably wont give you the look or feel you need but without a better understanding of the underlying data structure its hard to generate a better suggestion. Hopefully this will get you to thinking about the data queries and layouts which will lead to a better solution for you.
 
Regards,
 
John W.
 
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.016 seconds.