COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: TEVAMANA on 23 Aug 2011 10:54:48 AM

Title: Report in HTML ok but in Excel, csv or pdf ko
Post by: TEVAMANA on 23 Aug 2011 10:54:48 AM
Hello,

I got a question about Cognos services that run reports.

I got a report that is ok in HTML but is not in excel, csv or pdf. 

That means that it is not the same service running HTML or PDF, that is something I knew but I can't remember exactly what services is doing what...

Can someone helps me ?

Thanks for your input
Title: Re: Report in HTML ok but in Excel, csv or pdf ko
Post by: Arsenal on 24 Aug 2011 10:03:27 AM
If you post the error message you get for non-html outputs, it might help the posters here get a better understanding of your problem
Title: Re: Report in HTML ok but in Excel, csv or pdf ko
Post by: TEVAMANA on 08 Sep 2011 05:35:08 AM
Hello Arsenal,

The error message is the following: An error occurred while performing operation 'sqlPrepareWithOptions' status='-16'.

The HTML generation works fine but as soon as the end user changes the output format for pdf, excel or others it fails with this error message.

The question is how is it possible that the same report works fine in HTML and fails in PDF or excel.

Regards
Title: Re: Report in HTML ok but in Excel, csv or pdf ko
Post by: Lynn on 08 Sep 2011 07:41:44 AM
HTML output will only render as many rows as needed to present the first results and will go back to the database to fetch more as it is needed. PDF and Excel must process ALL the results before rendering the output.

One possible cause of what you are seeing is caused by something funky in the data that is encountered when you pull all the results, but not encountered in the initial pull of data for HTML rendering.

If you page down through EVERY page in HTML does it complete successfully or do you perhaps hit that same error somewhere down the line?

There is more to your error message than what you've posted, so open the details and see if there are more clues.

I have seen the behavior you describe in a scenario where a field is getting casted to some other data type (e.g., numbers to a date or characters to a number) but an invalid value is encountered causing the cast operation to fail.