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

Layout Component Reference / Pull Data from another report

Started by Philbo, 29 Jul 2020 11:14:36 AM

Previous topic - Next topic

Philbo

Hey guys,

It's possible I'm trying to do something the wrong way, or even trying to do something that isn't possible (something I frequently seem to try in Cognos!), but hoping someone can offer some advice.

I have a series of reports which generate lists or crosstabs and charts for different data areas (e.g. one for sales, one for profit, one for customer demographics etc), with the intention of launching these reports from main page report.

So far so good - I can drillthrough to the sub-reports from a text item hyperlink and get the reports to open in a new window.

What I now want is to pull through some of the key figures from these sub-reports onto the main page, as a headline for each sub-report. e.g. Total Sales YTD = £Xm, Total Profit YTD = £Y, Average client age = Z etc.
I have created a headline section in my sub report with a singleton displaying the figure i want to pull through to my main report.

This is where the problem hits - i assumed that a Layout Component Reference would work, something I've dabbled with before, but this doesn't seem to "see" the singletons - only the List and Chart objects in the sub-report are visible in the drop down list. I have tried renaming the singletons, naming the table element that they're contained within, and even creating a containing block and naming that, but none are visible to the layout component reference.

So,
1. are singletons just not usable with the Layout Component Reference? If so, why on earth not?!
2. any ideas how I can achieve what i'm attempting? I guess i could create the items as a list and format the list up to appear as a singleton, but that feels awfully hacky (something else i seem to frequently have to do in cognos!)

Thanks in advance guys!

MFGF

Quote from: Philbo on 29 Jul 2020 11:14:36 AM
Hey guys,

It's possible I'm trying to do something the wrong way, or even trying to do something that isn't possible (something I frequently seem to try in Cognos!), but hoping someone can offer some advice.

I have a series of reports which generate lists or crosstabs and charts for different data areas (e.g. one for sales, one for profit, one for customer demographics etc), with the intention of launching these reports from main page report.

So far so good - I can drillthrough to the sub-reports from a text item hyperlink and get the reports to open in a new window.

What I now want is to pull through some of the key figures from these sub-reports onto the main page, as a headline for each sub-report. e.g. Total Sales YTD = £Xm, Total Profit YTD = £Y, Average client age = Z etc.
I have created a headline section in my sub report with a singleton displaying the figure i want to pull through to my main report.

This is where the problem hits - i assumed that a Layout Component Reference would work, something I've dabbled with before, but this doesn't seem to "see" the singletons - only the List and Chart objects in the sub-report are visible in the drop down list. I have tried renaming the singletons, naming the table element that they're contained within, and even creating a containing block and naming that, but none are visible to the layout component reference.

So,
1. are singletons just not usable with the Layout Component Reference? If so, why on earth not?!
2. any ideas how I can achieve what i'm attempting? I guess i could create the items as a list and format the list up to appear as a singleton, but that feels awfully hacky (something else i seem to frequently have to do in cognos!)

Thanks in advance guys!

Hi,

Layout Component References are explicitly designed to allow you to re-use objects that define the layout of a report. A singleton isn't a layout object - it is driven by a query so it's a query-driven object. Layout objects or components are the structural and style parts of your report, eg tables, blocks, colours, borders, images etc. All of these can be referenced and re-used. Anything query-driven or based can't though.

Cheers!

MF.
Meep!

Philbo

Quote from: MFGF on 29 Jul 2020 12:18:12 PM
Hi,

Layout Component References are explicitly designed to allow you to re-use objects that define the layout of a report. A singleton isn't a layout object - it is driven by a query so it's a query-driven object. Layout objects or components are the structural and style parts of your report, eg tables, blocks, colours, borders, images etc. All of these can be referenced and re-used. Anything query-driven or based can't though.

Cheers!

MF.

Thanks for the reply. That makes sense, but why couldn't I see any of the sub-report Table or block elements in the drop down list? only a List and several charts - these aren't design elements?

I thought there was a way of pulling a data item through from one report to another - have I imagined this then? (quite possible!)

dougp

Put the singleton in a block and name the block.  Remember that the query to populate the singleton must also be in the report that is actually being used.  A query from another report can't be referenced.

MFGF

Quote from: Philbo on 29 Jul 2020 12:31:54 PM
Thanks for the reply. That makes sense, but why couldn't I see any of the sub-report Table or block elements in the drop down list? only a List and several charts - these aren't design elements?

I thought there was a way of pulling a data item through from one report to another - have I imagined this then? (quite possible!)

To be able to re-use an object, it must have an explicitly defined name. When you define a table or a block, its name property is empty by default - this means it's not available for re-use. If you select the table or block, go to the Properties pane and find the Name property, you can then add a name for it. Once you do this it will be visible for re-use.

To transfer data items from one report to another, you would pass them as part of the drill-through definition. Usually you'll need parameters in the target report to pass the items into.

Cheers!

MF.
Meep!

Philbo

Quote from: dougp on 29 Jul 2020 12:56:05 PM
Put the singleton in a block and name the block.  Remember that the query to populate the singleton must also be in the report that is actually being used.  A query from another report can't be referenced.
Quote from: MFGF on 29 Jul 2020 02:05:41 PM
To be able to re-use an object, it must have an explicitly defined name. When you define a table or a block, its name property is empty by default - this means it's not available for re-use. If you select the table or block, go to the Properties pane and find the Name property, you can then add a name for it. Once you do this it will be visible for re-use.

To transfer data items from one report to another, you would pass them as part of the drill-through definition. Usually you'll need parameters in the target report to pass the items into.

Cheers!

MF.
Thanks guys. I did actually try both of those things - using a block and a table, and naming both, but still neither could be seen. I even tried changing my 3 x singletons to a List, and this still couldn't be seen by the Layout Component Reference. At this point i knew something was wrong. Closed my main report and re-opened it and tried again, and voila - i could see the new List object! So it seems like the available options don't refresh properly or something? very odd.

Anyway, now I have realised through my trial and error and from both of you guys that I'm using the object wrong. I was trying to avoid having the query overhead in multiple places, but it appears that isn't possible. As the sub-reports will all be scheduled to run, i was hoping I could effectively grab some of the rendered details from those saved reports, but it would appear that isn't possible. I guess i'll have to duplicate the queries in my main report.

Thanks so much for your help guys.