Print Page | Close Window

Cross Tab Report- Suprressing unwanted columns

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=2645
Printed Date: 03 May 2024 at 2:56am


Topic: Cross Tab Report- Suprressing unwanted columns
Posted By: labscientist
Subject: Cross Tab Report- Suprressing unwanted columns
Date Posted: 19 Mar 2008 at 5:49am
I created a cross tab report to summarize laboratory data. Once the data is pulled there are some result columns that are not needed. Is there a formula or some way to suppress only certain columns so they do not print out on the report. Any help would be appreciated. Thanks.

-------------
Heather



Replies:
Posted By: BrianBischof
Date Posted: 19 Mar 2008 at 11:48am
You will have to build this into your record selection formula to filter out the data that you don't want printed. There is no way to disable columns from a cross-tab object.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: wislon32
Date Posted: 20 Apr 2008 at 4:53am
Brian is quite right in saying there is no way to remove them.  I haven't found a way of suppressing the column as such.  Filtering removes the data which may give you incorrect totals.

However, it is possible to 'suppress' the data for the given column.  The column gap will still be there but the data will not appear. To do this:
1) Open the Cross tab expert.
2) Go to the Custom Styles tab
3) In the Columns box, select the column you are interested in
4) Below the Columns panel is a box labelled 'Alias For Formulas'. You MUST give this a name (not the field name) For example BoardingDate. Anything will do; this is the 'variable' name you will use in the suppression formula later
5) Close the expert
6) Select the Column Header in the cross tab design (or preview). Right Click and select 'Format Field...'
7) In the Common tab, click the Conditional Format button.
8) In the editor select from the Functions Tab 'Formatting Functions' and find CurrentFieldValue. Place this in the editor.  To Suppress for example 'Others' complete the statement with
CurrentFieldValue like 'Other*'
Save and Close
9) For each summary field that you have in that column, and the total,
a) select the summary field, Right Click, select Format Fields and the Suppress conditional editor button
b) Find GridRowColumnValue and place it in the editor.
c) locate the name you used as an alias from RowAndColumnNames and
 put it between the brackets and add the condition:

GridRowColumnValue ("BoardingDate") like 'Other*'
Check and close

And there is no way that I've found of individually setting the column width, change one they all change, but this may help.







Print Page | Close Window