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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CrossTab question

Status
Not open for further replies.

sandradj

IS-IT--Management
Dec 23, 2008
6
0
0
US
I am pretty new to Cognos. I have a crosstab report in Crystal that I need to recreate in Cognos. I am having an issue with row format. Row heading is the Oracle datetime field with the format: 2008-01-31 12:00:00.000

My report needs to look like this:
Void Paid
Mar-08 5 10
Apr-08 12 13

I need to group row headings (datetime field) by month. Does anyone have an idea how to do this? Thank you!!!!
 
Various solutions.
One would be to use the Cognos extract function:

extract(month,[dateitem])

and assign this expression to a new query-item

If your package supports native Oracle function you could use:

to_char([dateitem],'MM') or to_char([dateitem],'MON')

Use these for grouping..

Ties Blom

 
Thank you! extract(month,[dateitem]) worked perfect. Another question, how do you add totals to both rows and columns so the report would look like this:

Void Paid Total
Mar-08 5 10 15
Apr-08 12 13 25
Total 17 23 40

I was able to add total to the rows but not to columns.

Thank you.

 
Disregard the question about totals. I figured it out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top