If you are unable to create a new account, please email support@bspsoftware.com

 

Is there a way to run javascript code first when user click Finish on a report?

Started by cognosdelaware, 19 Jul 2017 08:31:05 AM

Previous topic - Next topic

cognosdelaware

Hi,

  I am running Report Studio 10.2.2 and wondered if there was a way, when the prompt page is filled out and the user clicks on the "Finish" button, if there was an event I could wire to run to do some validation before the report is generated?

Thanks

CognosPaul

The Prompt API is your friend here. But why not have the validation happen as the users fill in the prompts?

Look up the setValidator function in the help, it has some decent examples.

cognosdelaware

Depending on my radio button selection, I clear the values of the other Text Box Prompt.

The user will enter their selections on the prompt page that they want to use for searching and when they click the "Finish" button, I want to check which radio button was selected and make sure the associated Text Box Prompt has data in it(as opposed to making it mandatory), since I have two and only one needs to be required at a time.

I was hoping there was some sort of "onclick" that the "Finish" button has, or some way to associate an "onclick" event to it and then I can have it run a function to check.