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

Export raw data into excel

Started by ATL, 12 Jul 2012 08:39:56 AM

Previous topic - Next topic

ATL

All,

I know the export topic has been discussed in depth in this forum, but I think that my question should be straightforward.

I know that there is an option to export the report in the excel, html, or PDF format that is built into all of the cognos reports, but that's really not what I'm looking for.  What I'd like to do is create an export button on the report that exports the raw data that the report has brought back from the database, including the column names.

I'm guessing that this is not something that can be done using only Cognos tools and that javascript will likely be involved.

Thanks in advance

Rahul Ganguli

You can create a query based on SQL and export the data to CSV.

tjohnson3050

This is a common report requirement that I see.  What I usually do in this case is create a variable based on the report output using the report function reportoutput().  Then I create separate formatted report pages and data dump pages. 

The data dump page has no headers, footers, grouping or summaries.

Each page is conditionally rendered based on the report output.  The formatted page only renders when PDF or HTML format is selected and the data dump page is only rendered when the format is something else.

With this design, no separate button is needed, when the user chooses excel, they get the data dump, when they choose pdf or html, they get a formatted report.

Lynn

Maybe the attached technique is something you can expand upon for your requirement. It uses a drill through back to itself so you can specify the desired output format. The "button" is just a text item that has a drill through definition defined. When I wrote this up (ages ago) I'm pretty sure I tried using the button objects but they didn't have a property allowing a drill through definition, so I settled for a text item.

I also do just what TJ describes by conditionally rendering different pages based on the output format whether I need to include prompting for output format or not. It ensures a clean result that is best suited for the various output formats.

chrysilis

Quote from: Lynn on 22 Aug 2012 06:37:36 AM
Maybe the attached technique is something you can expand upon for your requirement. It uses a drill through back to itself so you can specify the desired output format. The "button" is just a text item that has a drill through definition defined. When I wrote this up (ages ago) I'm pretty sure I tried using the button objects but they didn't have a property allowing a drill through definition, so I settled for a text item.

I also do just what TJ describes by conditionally rendering different pages based on the output format whether I need to include prompting for output format or not. It ensures a clean result that is best suited for the various output formats.

Thank you Lynn for this solution!

We were using Javascript from http://www.cognoise.com/community/index.php?topic=12546.0 to meet this requirement in Cognos 8 and have recently found it does not work in our Cognos 10 environment (after going live of course...) but your solution worked perfectly and we've implemented it in all of 5 minutes! If you're ever in Adelaide, Australia and want a beer/other beverage let me know.

Lynn

Glad to hear it worked out for you!!

I would love to visit Australia one day and also love beer. If I manage a trip I'll let you know. I live very near to New York City so let me know if you ever find yourself in that neck of the woods.

karanluniya

Hi Lynn ,
I am generating a dashboard in reporting studio . On the dashboard there are multiple tables . I would like to export a specific table into an excel sheet using a button . Thanks in advance. It would be great help.

Lynn

You can use the same technique and just pass an extra item in the drill through definition to conditionally render only the desired item.