Obfuscating report parameters.

3 posts, 0 answers
  1. Randy
    Randy avatar
    12 posts
    Member since:
    Apr 2014

    Posted 22 Jul 2014 Link to this post

    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. Hinata
    Hinata avatar
    146 posts
    Member since:
    Dec 2013

    Posted 25 Jul 2014 in reply to Randy Link to this post

    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.
  3. DevCraft banner
  4. Randy
    Randy avatar
    12 posts
    Member since:
    Apr 2014

    Posted 25 Jul 2014 in reply to Hinata Link to this post

    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. 
Back to Top