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

Report output in pdf

Started by sspk, 08 Feb 2011 02:33:54 AM

Previous topic - Next topic

sspk

Hi All,
I have a report which has columns like inv#, Inv amount,PO amt, and so on. Now I have a requirement like when I run the report in html format  , on the cognos viewer if I click a particular Inv#, it should open details about that particular Inv# in PDF format.How can we acheive this.


Thanks & Regards

blom0344

Use a second report that fetches the details per invoice and a drill-through definition from the original report to pass the invoice key to the child report. In the drill-through definition you can specify what you want to pass (probably a data item = invoice key) and how the child report should open (as pdf). The child report needs a auto-submit prompt for the invoice key..

sspk

Thanks blom, Is it possible with out creating a second report and  by defining a drill- thru definition.

blom0344

AFAIK the drill-through is designed to pass either parameter values or data-item values (in your case) These are then passed to the accepting parameter. This works for report to report drillthrough. I expect that you cannot reference itself (report) this way.
It is perfectly possible this way to start in HTML and call a PDF subreport. Why would this not suit you?

Lynn

You can create a drill through definition back to the same report.  It would need to have a parameter to accept the invoice number. It would need to be optional for the scenario you're describing.

Note that if you run the report while working in report studio you must remember to SAVE the report in order to test since it's drilling back to itself.

That said, I'd typically expect that you'd want to show MORE information about the clicked-upon invoice number (or arranged in a more pleasing layout) so having a second report formatted just as you like for the single item makes sense.

Or you could have two containers in one report set so that one renders only for HTML (e.g., showing information for all the invoices) and the other renders only for PDF (e.g., showing details on the desired invoice number).

blom0344

Cool Lynn, gonna try this and see if it indeed works..   ;)

Lynn

Quote from: blom0344 on 10 Feb 2011 08:52:52 AM
Cool Lynn, gonna try this and see if it indeed works..   ;)

You don't BELIEVE ME??  :o

Attached is something I wrote up that uses drill through back to the same report for dynamic column sorting without JavaScript. Someone smarter than me came up with this technique and I just expanded on it and wrote it up.

P.S. Don't tell melee or PaulM who will probably think it is stupid to use out of the box functionality when you can write perfectly good javascript that may break on upgrade
:)

blom0344

Among our team we have a standard quote , which,  when translates from Dutch would read:


Cognos, beautiful stuff,  WHEN it works...



Arsenal

Quote from: Lynn on 10 Feb 2011 09:03:02 AM
.

P.S. Don't tell melee or PaulM who will probably think it is stupid to use out of the box functionality when you can write perfectly good javascript that may break on upgrade
:)

What do you mean "may"? It WILL in all likelihood

melee

I'll have you all know that all of my 8.3 reports successfully made it to 8.4.1 without ANY problems whatsoever!














There was only one