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

Schedule reports who use Javascript

Started by yoniw, 09 Dec 2013 08:48:51 AM

Previous topic - Next topic

yoniw

Hello everyone,
I am using Cognos 10.2.1 fixpack 1, linux environment, Vertica /Oracle.
We have a problem - most of our reports run using javascript elements (to set time for example) in prompts.
we have a Drop down list with list of last 1 hour, last 2 hours etc. the selection in the report triggers a javascript function to change the begin and end time in the prompt page.

when we schedule a report to run on "last 1 hour" - because there is no "browser", the Javascript is not working and the dates remain the old dates...

Do you know how to enable the Javascript?

BR
Yoni

navissar

Hey Yoniw,
JavaScript is a run-time scripting language. This means that in order for JavaScript to work, it needs to be read and interpreted by a web browser. Before it does, it's just a bunch of letters.
Now, a scheduled report doesn't run the HTML for the prompt page, so it doesn't call on your JavaScript, therefore your JS doesn't exist as far as it is concerned.
However, not all is lost: The type of logic you're describing is easy to set up without any scripts: simply set up a filter with a condition that takes the selected prompt value and translates it to a desired date. For instance:
(?dateSelectionPrm?='today' AND [Date]=current_date)
OR
(?dateSelectionPrm?='yesterday all my troubles seemed so far away' AND [Date]=_add_days(current_date,-1))

You can make this prompt optional, so it doesn't mess up your current set up.

yoniw

I was afraid of that...:(
I thought maybe there is another way...

Thanks Nimrod (Toda).
Yoni

navissar

Hey Yoni,
If you're not keen on changing your reports, you could probably use Event Studio to populate the prompts based on the relevant logic.
Behatzlaha!