This is a migrated thread and some comments may be shown as answers.

Obfuscating report parameters.

2 Answers 41 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Randy
Top achievements
Rank 1
Randy asked on 22 Jul 2014, 04:44 PM
So my project is using the HTML5 report viewer to display reports that were created in the standalone report designer. I noticed that when the request is sent to view the report, that it first does a POST to get the report parameters, and than it does another POST with those report parameters to get the instance of the report. I have a report parameter that I'd rather not be exposed like this, and I was wondering if it's possible to stop it from being displayed. I'll give a short example of what ideally I'd like to be able to do and for simplicity sake, I'll just name my parameters X, Y and Z. 

I make a request for the report, and get back the clientId, then a request goes out for the report parameters and only Y and Z are returned since they're the only visible parameters as far as the client is concerned. When the request for the report instances hits the server with the default values of Y and Z, I preform server logic to figure out what the default value of X is and put it with the other parameters inside the pipeline and an instanceId is returned just like normal. Is this possible? 

The only other way I can think of doing this is to make a report that doesn't take X as a parameter and introduce it into the reportResolver that I have.

2 Answers, 1 is accepted

Sort by
0
Hinata
Top achievements
Rank 1
answered on 25 Jul 2014, 12:25 PM
Hi Randy,

From the described scenario it sounds like you don't need to use a report parameter for X, since it will not be set by the user. Then it makes more sense to get this X value in some other way. Regardless if it is a constant, or set it via some logic in your application you can create your own user function (http://www.telerik.com/help/reporting/expressions-user-functions.html), which will return the value for X and you can use the user function in expressions throughout the report. I hope this will work in your case.
0
Randy
Top achievements
Rank 1
answered on 25 Jul 2014, 04:35 PM
Thanks for your reply, what I ended up doing was when I uploaded the report on the server I went through the XML and removed the part where it listed X as a parameter. Then when I go to view the report I set X and add it back in inside the report resolver when it makes the request for the report. This makes it so that the request for report parameters doesn't show X on the network as a parameter but still uses and sets it inside the report. It sounds like it's a work around that would have been similar to what you suggested. 
Tags
Report Designer (standalone)
Asked by
Randy
Top achievements
Rank 1
Answers by
Hinata
Top achievements
Rank 1
Randy
Top achievements
Rank 1
Share this question
or