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

Pass string value from Master to Detail Report

Started by hwmohrmann, 03 Jul 2014 10:28:28 AM

Previous topic - Next topic

hwmohrmann

I have a detail report called by several different Master reports.
The Master reports summarize the information in different ways, and the detail report shows all the detail records.
What I would like to do is simply pass the Master report Name to the Detail report so that I can show the calling report Name in the Detail report.

I am new to Cognos Reports so I am hardly an expert.
I have spent hours Googling this with no luck.

Is there a simple way to do this?
Thanks in advance.

cognostechie

No need to feel bad if you are not an expert, that's what these forums are for.

There is a report name function available in Report Studio. I think it is ReportName () . If you
create a data item and insert this function and then pass the 'Data Item value' to the detailed
report, it should work.  I don't have RS open right now but give it a try, it should work.

hwmohrmann

The ReportName() function returns the name of the current report.
There is no way to set the name or any way to pass the name from the Master to the Detail.

cognostechie

I don't have access to RS right now but if nothing else, you can always create a data item and put the report name in there and pass it. I was just trying to make it dynamic. If your report name is 'Master 1 Report' then just put that in the data item and pass the Data item value. Since this will be string, it will definately get passed on

cognostechie

Here is the report xml for Master report. It works.


cognostechie


hwmohrmann

The problem that I always run into is this:
The report uses three values that are used as filters for the data: date range, program, item.

I add the Report Name data item to the detail.
I open the master and open the drill through and the new Report Name data item shows up.
I setup the data item and then run the Master report.
It asks for the date range and then displays.

I click the link to open the Detail report.
The detail opens a prompt and wants me to reenter the date range and to type in the Report Name.
For some reason adding the data item to the detail reports causes a linking problem between the Master and the Detail
I have even tried adding the Report Name as a dummy filter and that caused exactly the same problem.


.


No matter what I do the Detail always asks for the Report Name value.


cognostechie

I don't know how to help you. You are doing it wrong even after getting the report xml. Look at the report xml again of both the reports (master and detail) and try to understand it before you do anything.