Print Page | Close Window

Hide column in crosstab

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=9806
Printed Date: 01 May 2024 at 1:55pm


Topic: Hide column in crosstab
Posted By: jdonbavand
Subject: Hide column in crosstab
Date Posted: 23 Apr 2010 at 11:21pm
I have created a crosstab with percentages - see below but only want to keep the Yes column - is this possible?
 
                                       Yes    No
Australia                          28%  73%
Austria                             60%  40%
Belgium                            41%  58%
 
etc.
 
Thanks


-------------
Janet



Replies:
Posted By: Emir_W
Date Posted: 25 Apr 2010 at 1:58am
Janet,
 
You can modify the column only to show 'Yes' and ignore for 'No'.
 
Hope it help.
 
 


-------------
Emir W


Posted By: jdonbavand
Date Posted: 25 Apr 2010 at 5:37am
But how do I modify so I only see the Yes column, please?

-------------
Janet


Posted By: Emir_W
Date Posted: 25 Apr 2010 at 11:49pm

You can refer to same issue in this forum.

Try to follow this link: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=21 - http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=21
 
hope it help.
 


-------------
Emir W


Posted By: jdonbavand
Date Posted: 27 Apr 2010 at 9:06pm
I can see how to hide a column in an ordinary report but not in a crosstab one - I am being very stupid?

-------------
Janet


Posted By: Emir_W
Date Posted: 27 Apr 2010 at 9:33pm
Janet,

Sorry for misleading.
You can try these options:
 
1. You could always customize the crosstab style to have the font for fields in the summary column (headers, data, etc.) have the same color as the background making them invisible. Also set fontsize as small as possible to have a smaller 'empty' column
 
Or...
 
2. You can use conditional formatting for this.
There's a function GridRowColumnValue that can be used.
Example of use:
- Rightclick on the field(s) to be hidden -> 'Format field'
- Enter a formula like below for a conditional suppress or conditional formatting:
            GridRowColumnValue ("FIELD") like "VALUE"
Tip: you can choose FIELD from 'Functions' -> 'Formatting functions' -> 'Row or column names' in the function tree in the formula editor
 
 
 
hope it help.


-------------
Emir W


Posted By: jdonbavand
Date Posted: 28 Apr 2010 at 3:39am
Your second option has got me most of the way there thanks but I now see a column with no data in it. Is it possible to get rid of the column altogether? Thanks for your patience.

-------------
Janet


Posted By: Emir_W
Date Posted: 08 May 2010 at 7:44pm
Sorry for late to reply.
 
You are right. It'll gives you a blank column.
 
Last thing that I can do is (maybe not suitable with you):
To highlight column 'No' with black colour.
 
In my test I create a formula 'xYes' and make it as column.
It will gives me 2 columns 'Yes' and 'No'.
Then I make a 'highlight' for column 'No' with formula:
if value xYes='No' then
- font colour = black
- background colour = black
 
And I make it samething with the result.
 
So for column 'No' it will gives me black column.
 
 
 
hope it help.
Or maybe someone else can give better idea/solutions for you.
 
 
 


-------------
Emir W


Posted By: jdonbavand
Date Posted: 10 May 2010 at 2:20am
Thanks Emir. It is one way round but really I wanted to hide the whole column. Perhaps it is not feasible within a crosstab.

-------------
Janet


Posted By: Emir_W
Date Posted: 06 Jul 2010 at 9:59pm
i just try this steps and it might be fit with your issue.
sorry for being too much late to answer.
 
i've created a formula @yesno => if {tbl.acctype}=1 then "Y" else "N"
 
i made a crosstab with AccDesc as row and Yes/No as column.
and it count all transactions where the TypeTrx is '1'.
so it will print as:
                                       No      Yes
Accrued interest Dep        2         0
Fax Machines                    1         0
Car allowences                 0         1
Cash with Cashier            1         0
Bank Charges                   0         1
 
And i've modified my crosstab on for the 'Summarized field' from 'count of @yesno'  to  NthLargest of @yesno where N is '1'.
 
and it printed as:
                                       Yes
Accrued interest Dep        
Fax Machines                    
Car allowences                 Y
Cash with Cashier             
Bank Charges                   Y
 
 
 
hope it help for all.
 
 


-------------
Emir W


Posted By: jdonbavand
Date Posted: 26 Jul 2010 at 9:24am
Sorry not to have replied earlier but have been away. This looks good. Thanks so much for your help.

-------------
Janet


Posted By: ciril.s
Date Posted: 29 Nov 2012 at 11:18pm
I have similar problem. I want to display only rows that have specific values and ignore all others. Here was my solution: Open Cross-Tab Expert. In Cross-Tab under Rows select your row which should be conditional suppressed. Then select Group Options. This will open Cross-Tab Group Options dialog. Go to Specified Order and add filter. In this case, rows that match your criteria will be displayed in your cross-table all other rows will be placed in one row "Others". Then select tab Others and check Discard all others.



Print Page | Close Window