June 25, 2014 at 3:40 pm
Problem is there is only 1 parameter value and the report runs right away without allowing the user to click the 'view report' button.
In a new SSRS 2008 report, I am allowing the user to select which report they would like to see generated by selecting the report name from a dropdown list. This is a multi-valued parameter and the parameter name is called 'report'. The default value is for all 5 reports to be selected.
All 5 reports are on the 'main' report. There will be no subreports. Each report has its own unique matrix and the matrix is visibile based upon what is selected in the parameter called 'report'.
The following is how I make all 5 reports show up as a default selection.
1.Right-click the multiple parameter ‘repot’ to open the Properties dialog box.
2.Specify the values below in the Available values:
Label: report1 Value: report1
Label: report2 Value: report2
Label: report3 Value: report3
Label: report4 Value: report4
Label: report5 Value: report5
3.Specify the values below as the Default Values:
report1 report2 report3 report4 report5
4.Right-click the ‘report1’ to open the Tablix Properties dialog box.
5.Select Visibility in the left pane, type the expression below in the “Show or hide based on an expression” textbox:
=iif(InStr(join(Parameters!report.Value,","),"report1")>0,false,true)
6.Use the expressions below to control the visibility of the ‘report2’, ‘report3’, ‘report4’, ’report5’:
=iif(InStr(join(Parameters!report.Value,","),"report2")>0,false,true)
=iif(InStr(join(Parameters!report.Value,","),"report3")>0,false,true)
=iif(InStr(join(Parameters!report.Value,","),"report4")>0,false,true)
=iif(InStr(join(Parameters!report.Value,","),"report5")>0,false,true)
Thus can you tell me if there is a way for all 5 reports to be selected originally and not execute right away? I want the user to be ablew to click the 'view report' button?
June 25, 2014 at 4:25 pm
AFAIK if you set defaults for all of a report's parameters, it will automatically run for those defaults. Since this report has one parameter and you are specifying a default, it will always run for that default when you open it in SSRS. I think the only way to allow the user to select a report without it automatically running is to remove the default. You could do this either in Visual Studio or in SSRS (Properties -> Parameters -> uncheck the Has Default box)
June 25, 2014 at 4:32 pm
In order for the report to wait for user input, you need a parameter with no default that does not allow Null values, but can allow blank values.
So, I tend to add a parameter that allows blank values, has no default value and is called Description or Comment, then optionally add that parameter to the report header.
This prevents autorun and has the added bonus of letting the user add a comment to the report if they wish.
MM
select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);
June 26, 2014 at 9:01 am
what you suggested here causes no default values to be selected. I want the default values to be selected.
June 26, 2014 at 10:57 am
I did not say to change anything on your parameter that has default values.
MM
select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply