Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Suppressing records based on complex condition Post Reply Post New Topic
Author Message
StrayKatt
Newbie
Newbie
Avatar

Joined: 08 Jan 2011
Location: United States
Online Status: Offline
Posts: 3
Quote StrayKatt Replybullet Topic: Suppressing records based on complex condition
    Posted: 16 Jan 2011 at 2:37pm
I am working on a complicated report that I can't seem to crack. I have an Inventory table that holds IDs and codes associated with the IDs. Each ID can have more than one code, but will only be in the table if they have at least one. My report lists all the codes across the top and needs to print only the IDs that have at least one code missing. The word "Missing" prints in the column for any code that is missing for that ID. I am OK up to this point. The IDs are divided into numbered groups. There is another table that holds group numbers and IDs that meet a certain condition. There may be some IDs in a group that don't meet the condition, even if the group does. I need to suppress any IDs that are not in Table 2 if the group number is in Table 2. So if the group number does not appear in Table 2 then I print all IDs in that group, but if the group number does appear in Table 2 then I only print IDs that are also in Table 2. I have tried using formulas and variables, but I can't make it work. I would appreciate any suggestions. Thanks.
StrayKatt
IP IP Logged
StrayKatt
Newbie
Newbie
Avatar

Joined: 08 Jan 2011
Location: United States
Online Status: Offline
Posts: 3
Quote StrayKatt Replybullet Posted: 17 Jan 2011 at 4:27am
I was afraid my description might not be clear enough, so here is a simple example:

Table 1:
ID1 Code1 Group1
ID1 Code2 Group1
ID2 Code2 Group1
ID3 Code1 Group2

Table 2:
ID1 Group1

So we can have three possible combinations:
Group not in Table 2
Group in Table 2 and ID in Table 2
Group in Table 2 but ID not in Table 2

I need to suppress any IDs where the last combination is true. I only need to figure out how to tell if the suppress condition is true. I have tried using Boolean variables but nothing I do is working right. Thanks for your help.
StrayKatt
IP IP Logged
asam
Newbie
Newbie
Avatar

Joined: 08 Jan 2011
Online Status: Offline
Posts: 20
Quote asam Replybullet Posted: 23 Jan 2011 at 6:00am
I would be interested to know how you go about getting the data; are you running a query against a database or trying to sort everything out inside the report?  Do you have a Table that contains just the codes and perhaps a description?
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.