Author Topic: Read excel file and load data in value prompt in Cognos 11  (Read 716 times)

Offline Hardik Binnani

  • Full Member
  • ***
  • Join Date: Jan 2018
  • Posts: 11
  • Forum Citizenship: +0/-0
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
Thank you,
Hardik Binnani

Offline dougp

  • Statesman
  • ******
  • Join Date: Jul 2014
  • Posts: 685
  • Forum Citizenship: +25/-1
Re: Read excel file and load data in value prompt in Cognos 11
« Reply #1 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.

Offline Hardik Binnani

  • Full Member
  • ***
  • Join Date: Jan 2018
  • Posts: 11
  • Forum Citizenship: +0/-0
Re: Read excel file and load data in value prompt in Cognos 11
« Reply #2 on: 19 Jul 2020 09:25:20 am »
Can anyone help me with this please! :)
Thank you,
Hardik Binnani

Offline jeamsx

  • Full Member
  • ***
  • Join Date: Mar 2009
  • Posts: 9
  • Forum Citizenship: +0/-0
Re: Read excel file and load data in value prompt in Cognos 11
« Reply #3 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.
IBM Certified Solution Expert - Cognos 8 BI
IBM Certified Developer - Cognos 10 BI Metadata Models
IBM Certified Designer - Cognos 10 BI Reports
IBM Certified Developer - Cognos 10 BI Data Warehouses