Data Connectivity
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Data Connectivity
Message Icon Topic: Conditional Report Generation Post Reply Post New Topic
Author Message
nehaojha
Newbie
Newbie
Avatar

Joined: 29 Mar 2010
Location: United States
Online Status: Offline
Posts: 9
Quote nehaojha Replybullet Topic: Conditional Report Generation
    Posted: 29 Mar 2010 at 10:04am
This is how my crystal report should look like
A main header INSPECTION REPORT and sub header active as of then print date.
                         INSPECTION REPORT
            Active as of report date(todays date)
Tech Name Certificate # Issue Date Expiration Date
abc               3465            04/25/2007   06/30/2011
efg               ---              ---        ---
            Expired as of report date (todays date)

Tech Name Certificate # Issue Date Expiration Date

            Terminated as of report date

Tech Name Certificate # Issue Date Expiration Date

Now I have a stored procedure that populates these fields

I wanted to ask is there any way I can add a logic that will route all values depending on when the expiration date is. Like is it is active fields of active is populated is it is expired then then fields of Expired as of report date (todays date) is populated.
your help will be greatly appreciated

Neha
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 30 Mar 2010 at 12:55pm
Do you have a field that identifies whether the item is active or terminated?  If so, this is fairly simple.
1.  Group on the active/terminated field - I'll call it {table.status} for this example.
 
2.  Insert a second group header section for this group.  In one, put the header that you want to show if {table.status} is Active, in the other put the data you want to show if it {table.status} is Terminated.
 
3.  Create a second details section and set up so that you have one for Active and one for Terminated.
 
4.  Right-click on sections area to the left of your screen and click on Section Expert.  For each of the Active sections click on the button to the right of "Suppress" (do NOT check the check box!) and something like the following in the formula:
 
{table.status} <> 'Active'
 
Do the same thing for the Terminated sections.
 
This will suppress the sections that aren't supposed to print for each status.
 
-Dell
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.018 seconds.