Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crosstab Question 1

Status
Not open for further replies.

UcfMike

IS-IT--Management
Mar 29, 2007
184
US
I have a calculated column in a crosstab report. Basically if the condition is true, I want it to return the column, if it's not true I want it to do nothing. At the moment I have this case statement.

case [Sales Year] when ?Parameter Year?
then 'YTD ' + ?Parameter Year?
end

This returns the column I want but also return an additional column showing the non true data. How can I prevent the unwanted column from showing.
 
We experienced the same behavior today. Crosstab columns do not seem to follow the same behavior as columns in lists.
Couldn't get it to work either, so we skipped it altogether.

A thought we did not test is to use conditional blocks and use 2 crosstabs in them. Depending on the condition show 1 of the blocks with the proper crosstab in it.

Perhaps this is a solution that might work for you..?

Ties Blom

 
Blom,

I took your idea and made it work.

First I changed the original calculation to this:

case [Sales Year] when ?Parameter Year?
then 'YTD ' + ?Parameter Year?
else 'donkeykong'
end

I then created another calculation [YTD Display Calculation]:

if ( [YTD Bucket Calculation] = 'donkeykong' ) then ( 1 ) else ( 0 )

I then created a boolean conditional variable:

[Report Query].[YTD Display Calculation] = 1

I then added [YTD Display Calculation] to the crosstab column over [YTD Bucket Calculation]. I then went to my variable and set it to yes. I then changed the box type of the fact cells for [YTD Bucket Calculation] to none, I also changed the [YTD Display Calculation] for the variable = yes. Next I went back to the report and set the column titles for [YTD Bucket Calculation] to none.

Finally in the [YTD Display Calculation] column title I changed the label type to a report expression, and did some updating to the formatting.



 
Cheers!
Looks like you came up with a solution on your own , but perhaps I gave you some food for thought :)

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top