COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Victoria on 27 Sep 2017 02:59:09 PM

Title: Parameterized URL to run in the backgroud
Post by: Victoria on 27 Sep 2017 02:59:09 PM
Hi! :)
I am using Cognos 10.2 and Parameterized URL to run a report. Is it possible to run the report in the background via URL?

Thanks!
Title: Re: Parameterized URL to run in the backgroud
Post by: bdbits on 02 Oct 2017 01:06:30 PM
What are you trying to achieve? It seems to me their might be a better way to do this.
Title: Re: Parameterized URL to run in the backgroud
Post by: Victoria on 02 Oct 2017 05:24:55 PM
I have set of parameters that I need to pass to the report but I need this report to either be emailed or saved. These parameters are coming from external file. I researched about the trigger file (.bat) but I can't pass any parameters at all this way. Do you know some other way of doing it?

Thanks,
Victoria
Title: Re: Parameterized URL to run in the backgroud
Post by: bdbits on 05 Oct 2017 12:08:48 PM
Depending on the file format, you could perhaps use your file as an external data source, which would create a new package you bind to your existing FM package. You do need a permission to do this, and some organization restrict access to this capability. More info at https://www.ibm.com/support/knowledgecenter/en/SSEP7J_10.2.2/com.ibm.swg.ba.cognos.ug_cr_rptstd.10.2.2.doc/c_rs_cwa_mng_ext_dta.html (https://www.ibm.com/support/knowledgecenter/en/SSEP7J_10.2.2/com.ibm.swg.ba.cognos.ug_cr_rptstd.10.2.2.doc/c_rs_cwa_mng_ext_dta.html).

Aside from that, can there be a load process to get what you need from the file into a table that can be included in your FM package?

I would prefer one of the above options, but I would think the URL could be made to work if you really want that. But then I have to wonder how are you going to read in the paramters? If it is from a program that will in turn run the report, there are quite a few Cognos APIs that could be called which would not involve submitting a URL. If you want to do this is from a batch file or script, there are utilities like wget and curl to non-interactively 'open' a web page from a batch file, but then you are going to have install those wherever you want to run this from. In any case, you'll probably want to set the report properties to save/email it as desired.
Title: Re: Parameterized URL to run in the backgroud
Post by: Victoria on 13 Oct 2017 01:25:32 PM
Thanks for the reply!

I tried the approach with saving values to the table first and adding it to the FM package. I ran into another issue: I am reporting from a TM1 cube. In my table I have a column Month that has for example 5 rows with different months. I need to pass all 5 values to my report. TM1 and relational table doesn't work together very well. I figured out how I can pass 1 value to the report (with the master detail relationship) but it doesn't work when I am trying to pass multiple values. I can't use joins, unions etc because it is a cube.
Title: Re: Parameterized URL to run in the backgroud
Post by: Victoria on 13 Oct 2017 01:27:31 PM
And yes I am using batch file to trigger my report (there is no way to pass parameters from batch file to the report).