Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Record not visible in Group header/Page Header Post Reply Post New Topic
Author Message
rahmaniac22
Newbie
Newbie


Joined: 24 Feb 2010
Location: United States
Online Status: Offline
Posts: 14
Quote rahmaniac22 Replybullet Topic: Record not visible in Group header/Page Header
     Posted: 01 Dec 2011 at 10:15am

I am using Crystal Reports 2008.

I am using a simple formula to bring in a field into the report.
 
IF {Command.DATASET} = 'STRESS_TEST'
THEN DATE({Command.AS_OF_DATE})
 
The issue is that the formula works for the report footer
but not the page header and group header.
 
When I Place the field in the Details, I can see the records. But I am unable to display in the Page Header.
 
Please advice.
 
Thanks.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 01 Dec 2011 at 10:44am
when you place this formula in a page header it is evaluated only for the first row on that page, Therefore if the first row has a a command.dataset value <> to 'Stress test' then it will display nothing.
When placed in a group header it is evaluating the first row in the group.
When placed in the report header it is evaluating the first row in the report.


Edited by DBlank - 01 Dec 2011 at 10:45am
IP IP Logged
rahmaniac22
Newbie
Newbie


Joined: 24 Feb 2010
Location: United States
Online Status: Offline
Posts: 14
Quote rahmaniac22 Replybullet Posted: 02 Dec 2011 at 9:24am

Thanks DBlank.

Can you please let me know how i will be able to resolve this issue ?
 
Thanks in advance.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Dec 2011 at 4:28am

Perhaps I (or someone else) can help if you explain your report structure, your data and what you want to appear in the headers.

IP IP Logged
rahmaniac22
Newbie
Newbie


Joined: 24 Feb 2010
Location: United States
Online Status: Offline
Posts: 14
Quote rahmaniac22 Replybullet Posted: 05 Dec 2011 at 9:32am
Thanks for the response DBlank
 
I have a formula in CR to display the date field from a sql query.
IF {Command.DATASET} = 'STRESS_TEST'
THEN DATE({Command.AS_OF_DATE})
ELSE
IF {Command.DATASET} = 'CURRENT_TEST'
THEN DATE({Command.AS_OF_DATE})
 
The SQL query has 2 set of query from different dates depening upon the field dataset.
 
I need to display both the dates as PageHeader using the above formula.
Stress Test Date :
Current Test Date :
 
 
Please advice.
 

 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Dec 2011 at 12:17pm
if this is one value per type for your entire data set you can use a MINIMUM() and MAXIMUM() funtion and these can be displayed in headers.
you can create 2 formulas to split the content sionce it is in the same field
//stress_test
IF {Command.DATASET} = 'STRESS_TEST'
THEN DATE({Command.AS_OF_DATE})
//header formula stress
maximum(@stress_test)
 
//current_test
IF {Command.DATASET} = 'CURRENT_TEST'
THEN DATE({Command.AS_OF_DATE})
//header formula current
maximum(@current_test)
 
 
 
IP IP Logged
rahmaniac22
Newbie
Newbie


Joined: 24 Feb 2010
Location: United States
Online Status: Offline
Posts: 14
Quote rahmaniac22 Replybullet Posted: 06 Dec 2011 at 3:53am
Thank You DBlank.
 
 
IP IP Logged
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