|
Re: Conditionally hiding report parameters [message #641350 is a reply to message #641332] |
Thu, 25 November 2010 06:57 |
|
If you are going to use the viewer this is not going to be possible.
One work around is to add a jsp page that does the checking you want and
then forward to one of two report (copy the orginal and disable the
parameters). The other way would be to write a report that forwards to
another report. Just add a text element with something like:
<script type="text/javascript">
function forward() {
var temp = new String(location.href);
//alert( temp );
var detailReport = "detail.rptdesign";
var TargetURL = temp.replace(/forwarddetail.rptdesign/, detailReport);
location.replace(TargetURL);
return false;
}
forward();
</script>
In the above you will need to set the detailReport based on your logic
to check for the user. Like:
var detailReport =
"<VALUE-OF>reportContext.getGlobalVariable("detailforuser"); </VALUE-OF>";
In your initialize (prbly better to put in beforeFactory) do your check
and set the value above:
var usr = ..getfromsession
//do usr to report correlation
reportContext.setGlobalVariable("myreport.rptdesign");
Jason
On 11/24/2010 10:40 PM, Josh wrote:
> Hi,
>
> I am able to make report parameters hidden at design time by setting
> 'Hidden' to true in the Advanced tab of the Property Editor.
>
> I'd like to be able to set this at run-time and cannot figure out how. I
> have tried adding the following to the initialize method of the Report
> Design, however I think this is too late as it doesn't affect the UI at
> all:-
> reportContext.getDesignHandle().findParameter('site_rptParam ').hidden =
> true;
>
> Any ideas?
>
> If you're wondering why I want to do this, it's because for certain
> users I want to force a selection, and for others to make the selection
> programatically, and hide the parameter on the UI.
>
> Regards, Josh.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04629 seconds