cancel
Showing results for 
Search instead for 
Did you mean: 

WAD - Script doesn't execute after re-submission with variable values

0 Kudos

Requirement: We have a requirement to manipulate the output of the WAD report as these cant be met with standard functions available in Query Designer i.e. namely concatenate cells, color certain cells and change text, and hide some columns after data manipulation.

Solution: We changed the analysis item to Display Mode = Plain HTML.

Added Script Item and wrote a Java script which does the requisite functions and changes the output and format of table at Client side.

<script type="text/javascript" >concat_text();</script>

We have added the script tag before the </body> tag it works fine when we execute the WAD report for the first time.

Problem: The Function works and manipulates the data only during the first execution i.e. once the WAD report is executed and user enters the variable values and executes it.

But after that if user clicks on the Button, which we have added to call the Variable screen then this Javascript is not getting executed. The page refreshes with selected variable value and displays the actual data without any manipulation.

I tried adding the calling the script in <body onload="“javascript:concat_text();" > but it doesn't work.

Please let me know if you any solution to trigger the function after entering the Variable selection.

Regards,

Nitin S.

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

The problem somehow seems to be resolved now.

I have removed the script from Body tag and included only as

            <script type="text/javascript" >concat_text();</script>

        </body>

Now when i execute the WAD report the script runs for the first time as it was earlier.

After that i click on the button for Variable selection and execute with variable values then again it executes the script the manipulates the table.

But the only problem with this client side manipulation is that the users can see the old table for split second and then the script manipulates and displays the new table as the operation is completely happening on client system.