Report Design
 Crystal Reports Forum : Crystal Reports .NET 2003 : Report Design
Message Icon Topic: Conditional hiding of column header Post Reply Post New Topic
Author Message
subash141
Newbie
Newbie


Joined: 28 Mar 2011
Online Status: Offline
Posts: 9
Quote subash141 Replybullet Topic: Conditional hiding of column header
    Posted: 22 Jul 2014 at 9:21pm
HI,
 
My requirement is conditional hiding of column headers based on column values. If a particular column doesn't display any values then that column header should be hide.
 
For this i did a work around like below ...
 
first i created a variable as
numbervar x:=0; -- placed this in page header.
 
created a second variable like ...
whileprintingrecords;
x:=x+(if isnull(column) then 0 else 1)  -- placed this in detail section
 
created third variable sum like ...
whileprintingrecords;
numbervar x;  -- placed this in page footer.
This sum will display no of values displayed in that column per page in the page footer.
 
hiding condition is
 
if ( isnull(column) and {sum}=0) then true else false.
this condition is working for some pages not working for some pages.
 
 
Please help me in this issue.


Edited by subash141 - 22 Jul 2014 at 9:22pm
IP IP Logged
subash141
Newbie
Newbie


Joined: 28 Mar 2011
Online Status: Offline
Posts: 9
Quote subash141 Replybullet Posted: 24 Jul 2014 at 12:31am
Hi,
 
I got the solution for this. By placing the column headers in group header and writing the hiding condition i achieved.
 
I have taken distinct count of values and placed that value also in group header.
Based on this value i have written hiding condition.
 
"distinct count(column)=0 then hide."
 
Now it is working fine.
 
Thanks,
Subash
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.