855.367.3511 | CONTACT US

Author Topic: Hidden Parameters  (Read 6494 times)

ncar

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
Hidden Parameters
« on: February 24, 2015, 12:44:59 pm »
Report parameter handling seems to have changed in the last couple of versions.  I used to be able to have the report execute immediately after calling the ‘loadReport’ method if all of the parameters had values or all of them were hidden.  Also defaults specified in the report designer are not used as default values in the report viewer.  Not sure if this issue is because of a code change in the updated versions or a license issue.
« Last Edit: February 24, 2015, 12:47:12 pm by ncar »

taniac

  • Full Member
  • ***
  • Posts: 148
    • View Profile
Re: Hidden Parameters
« Reply #1 on: February 24, 2015, 12:46:34 pm »
Parameter reports have been through some changes in the latest release. What exactly are you seeing when you run the reports with default values? Also are you running this with the original version of Mobilizer or with a modified version of Mobilizer that has been written in house?
« Last Edit: February 24, 2015, 12:48:13 pm by taniac »

ncar

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
Re: Hidden Parameters
« Reply #2 on: February 24, 2015, 12:49:27 pm »
The bug of not taking default parameters that were set up in report designer is still there, but  I have a workaround so this is not a show stopper issue for us.  For the workaround I set all parameters with default values in code instead of relying on the report parameters values set in the report designer.
 
Thank you for your help and getting back to me so quickly.

taniac

  • Full Member
  • ***
  • Posts: 148
    • View Profile
Re: Hidden Parameters
« Reply #3 on: February 24, 2015, 12:50:28 pm »
Thank you for getting back with us.  Mobilizer will use the server defaults if you set UseDefault to true
 
$reportViewer.reportViewer("loadReport", "/Northwind Test Suite/Simple Parameter", 1, {
            "ParamsList": [{
                "Parameter": "CategoryID",
                "Value": "1"
            },
            {
                "Parameter": "SecondParam",
                "UseDefault": "true"
            }]
        });

ncar

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
Re: Hidden Parameters
« Reply #4 on: February 24, 2015, 12:51:25 pm »
That does help with the default value issue.   
 
One remaining issue I have is I must have at least one visible parameter in the report for it to work correctly.  If all parameters are marked hidden then ParameterJSON call is called correctly, but the ReportJSON call will be called with a null ParametersPostBack.ParameterList.   I would like to have all parameters hidden so that if the parameter list popout is activated by the user, not parameters should be there.  We plan to disable the parameter list anyway so the user won’t be able to access it, but this still seems like a bug you would want to fix.
« Last Edit: February 24, 2015, 01:01:01 pm by ncar »

taniac

  • Full Member
  • ***
  • Posts: 148
    • View Profile
Re: Hidden Parameters
« Reply #5 on: February 24, 2015, 12:52:38 pm »
Thank you for letting us know.  We are not seeing this behavior.  One thing that happens is that SSRS does not change parameter definitions on deploy, the server setting win.  Many times you need to delete the report or change the parameter setting on the server.
 
You can also hide the parameters in code. Setting the Prompt to “” will hide the parameter.  In the case below the report will run with the default and supplied values and all the parameters are hidden.
$reportViewer.reportViewer("loadReport", "/Northwind Test Suite/Simple Parameter", 1, {
            "ParamsList": [{
                "Parameter": "CategoryID",
                "Value": "1",
                "Prompt":""
            },
            {
                "Parameter": "SecondParam",
                "UseDefault": "true",
                "Prompt": ""
            }
            ,
            {
                "Parameter": "UpdateParam",
                "UseDefault": "true",
                "Prompt": ""
            }]
        });
« Last Edit: February 24, 2015, 12:54:23 pm by taniac »

ncar

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
Re: Hidden Parameters
« Reply #6 on: February 24, 2015, 12:53:15 pm »
Thanks, that should do the trick for what we need.  Good to know about that parameter bug in SSRS.  We were using reporting tools in VS and using deploy, but as you said the reports don’t update properly.  You have to delete them first.
« Last Edit: February 24, 2015, 01:00:28 pm by ncar »