COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: wwconslt on 03 Mar 2022 12:35:25 PM

Title: Crosstab Report with Totals won't run to Excel
Post by: wwconslt on 03 Mar 2022 12:35:25 PM
Hi Everyone,

Cognos v 11.0

I've got a crosstab with totals. It runs great in HTML and totals are correct. When I try to run it to Excel, I get this error:

OP-ERR-0207 The data item dataItem="Total(calc_Fund)" is invalid. The 'within detail' or 'within aggregate' clause cannot be used in a list report.
         
The crosstab intersection total has Default as the Summary and Aggregate property.

Any ideas how I can fix this?

Couldn't upload attachments.
Title: Re: Crosstab Report with Totals won't run to Excel
Post by: dougp on 03 Mar 2022 06:48:22 PM
My guess is your problem description is not sufficiently specific.

Are you running the report to Excel?
Are you running the report to Excel Data or CSV?
Are you running the query (view tabular data) to Excel?

...because there's a difference.

It should work fine if you're running the report to Excel... unless there's something else going on.

The query includes the Total(calc_Fund) data item that was created by clicking on the Total summarize tool.  Running the query to anything could be problematic.

Running the report to Excel Data or CSV means you're really running the query, not the report.  Take a look at IBM's documentation about this (https://www.ibm.com/docs/en/cognos-analytics/11.0.0?topic=results-view-output-in-microsoft-excel-format).  Notice the information about "Excel 2007 data". 
QuoteThe generated output includes only the first list query in the report.
And you won't get what's on the report page.
Title: Re: Crosstab Report with Totals won't run to Excel
Post by: wwconslt on 04 Mar 2022 12:26:11 PM
Thanks. Running to Excel 2016. Relational model. Even tried the Pivot to crosstab feature and still get same error.
Title: Re: Crosstab Report with Totals won't run to Excel
Post by: MFGF on 04 Mar 2022 01:15:13 PM
Quote from: wwconslt on 04 Mar 2022 12:26:11 PM
Thanks. Running to Excel 2016. Relational model. Even tried the Pivot to crosstab feature and still get same error.

Hi,

Just to be absolutely clear, you're rendering as Excel, and not Excel Data? The message you're seeing references a list report, but there are no lists in the report, just a crosstab?

Cheers!

MF.
Title: Re: Crosstab Report with Totals won't run to Excel
Post by: wwconslt on 07 Mar 2022 02:48:19 PM
Yes, rendering to Excel, not Excel data. The crosstab is the only object on the page--no lists.
Title: Re: Crosstab Report with Totals won't run to Excel
Post by: MFGF on 08 Mar 2022 07:17:25 AM
Quote from: wwconslt on 07 Mar 2022 02:48:19 PM
Yes, rendering to Excel, not Excel data. The crosstab is the only object on the page--no lists.

Are there any other pages? Any hidden objects? Out of interest, do you get the same (or similar) errors when rendering as PDF?

Cheers!

MF.
Title: Re: Crosstab Report with Totals won't run to Excel
Post by: wwconslt on 30 Mar 2022 09:07:10 AM
Thanks for your help. I ended up rewriting the report and it worked. Not sure why it works now other than recreating totals. Maybe it was corrupted @ the cognos store level?
Title: Re: Crosstab Report with Totals won't run to Excel
Post by: MFGF on 30 Mar 2022 09:45:35 AM
Quote from: wwconslt on 30 Mar 2022 09:07:10 AM
Thanks for your help. I ended up rewriting the report and it worked. Not sure why it works now other than recreating totals. Maybe it was corrupted @ the cognos store level?

Thanks for the update. Glad you got it working. I can't really imagine where that error was coming from - unless you had a hidden list somewhere in the report?

Cheers!

MF.