COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: Hardik Binnani on 07 Jul 2020 01:34:26 PM

Title: Read excel file and load data in value prompt in Cognos 11
Post by: Hardik Binnani on 07 Jul 2020 01:34:26 PM
Hi,

My requirement is as follows:

An excel file is stored in an online storage. We can access it via it's URL. That excel file contains simple data with just 2 columns and several rows. for example: country, states

That excel file has to be used as a input (prompt) to my report. Can that be done using java script?

Can't use External Data feature in cognos, as that file should accessible to the business users who would be updating the file regularly.

Thank you,
Hardik
Title: Re: Read excel file and load data in value prompt in Cognos 11
Post by: dougp on 08 Jul 2020 05:36:15 PM
See https://public.dhe.ibm.com/software/data/sw-library/cognos/mobile/scriptable_reports/ValuePromptControl.html

Good luck reading the Excel file using JavaScript.  You may need to create a web service (C# ashx file?  PHP file?) that does most of the work for you.  Then your script can consume the result and populate the prompt control.
Title: Re: Read excel file and load data in value prompt in Cognos 11
Post by: Hardik Binnani on 19 Jul 2020 09:25:20 AM
Can anyone help me with this please! :)
Title: Re: Read excel file and load data in value prompt in Cognos 11
Post by: jeamsx on 05 Aug 2020 11:06:21 AM
Hi,

You can load your Excel using Cognos Notebook to a data set.

After, in your report, use a custom control (Cognos samples has one called SetValuePrompt) to set your prompt default value.