I was recently given a WebFOCUS demo to import and perform some testing on it. It was a standard set of assets: data files, .fex files, html files, and various media assets.
I came across a problem when I tried to run one of the HTML pages and I was fairly sure there was a problem with how the parameters from the HTML page were being passed to the report it referenced.
One of my colleagues showed me a great debugging tip.
In your .fex file that takes the parameters from the HTML page, enter the following lines at the very top:
What this will do is echo out all the amper variables and their associated values. This helped me determine which amper variables (parameters) were causing the issue. Once I figured that out, I went to HTML Composer and fixed the user control binding that was associated with this amper variable.
Once my fix was complete, I would uncomment out those two lines to validate that my fix worked.
Best Practice Tip
The first line is more flexible than just looking for all ampers. You can actually use it like a simple search. I.e. the syntax looks more like this:
-? &[some succeeding characters]
This will echo out only parameters that are prefixed with ‘MY_’