If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

[Solved] Display Last Month In Text Item

Started by agorsky, 20 Oct 2005 06:05:38 PM

Previous topic - Next topic

agorsky

Hello--

I have been trying to figure out a problem regarding the Text Item object used as a report header (above the report & NOT in the header area).Ã,  I have created a Year to Date report.Ã,  I created 1 Text Item that says "January - ".Ã,  I created another Text Item that I want to display the name of the previous month.Ã, 

I have added a Data Item to the query that has the following expression: extract(month,_add_months(current_date,-1))Ã,  I have ensure that aggregation is turned off.Ã,  Within the Text Item I add the following code into the Expression Editor:

CASE [PreviousMonth]
WHEN 1 THEN 'January'
WHEN 2 THEN 'February'
WHEN 3 THEN 'March'
WHEN 4 THEN 'April'
WHEN 5 THEN 'May'
WHEN 6 THEN 'June'
WHEN 7 THEN 'July'
WHEN 8 THEN 'August'
WHEN 9 THEN 'September'
WHEN 10 THEN 'October'
WHEN 11 THEN 'November'
WHEN 12 THEN 'December'
END

NOTE:Ã,  We successfully did this on a List Report but this is a Crosstab and does not seem to work. I have literally copied what we have in the working List report to this Crosstab report.Ã,  However, the report fails to validate.Ã,  It states that the CASE statement is invalid.Ã,  The List report DOES validate properly.

Any ideas?Ã,  I am stumped!

Thanks!

Aaron


sir_jeroen

You know that a crosstab can't handle text items in the facts area?

wink

Hi,

But the question is... do you want to show these values as cells or on the rows / columns.... ? If cells it is gonna be hard.... on rows or columns it shouldn't be a problem...... So info needed to help you.

Regards, vincent

agorsky

Hello... I am attaching a screenshot of the report layout.  Let me know if this helps clarify what I am trying to accomplish.
I appreciate the help!

Aaron

sir_jeroen

For my ease: Can you create the list report based on GO Sales and post it... I will try to work this out to a  solution / tutorial...

agorsky

Hi...

Attached are reports from GoSales in 2 formats: list and crosstab.  I can get the list format to work correctly.  However, the crosstab is proving to be a challenge.  I look forward to your solution!

Thanks,

Aaron

sir_jeroen

Your solutions is on the way... It's gonna be a very short tutorial

sir_jeroen

There's a new tutorial for this... Good luck and  please don't forget to Close / Solve this topic's status....

sir_jeroen

Btw...
You could also do with a Master/Detail report. In the master report you define your filters eg. Year/month/Product line

That would be even easier.