Suppressing records based on complex condition
Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Writing Code
Forum Discription: .NET programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=12079
Printed Date: 04 May 2025 at 8:21am
Topic: Suppressing records based on complex condition
Posted By: StrayKatt
Subject: Suppressing records based on complex condition
Date 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
|
Replies:
Posted By: StrayKatt
Date 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
|
Posted By: asam
Date 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?
|
|