SSRS Paramaters

  • Hi everyone

    I have a report in SSRS which contains the paramater @Region. The paramater allows for multiple selections and is set automatically to show all of the regions.

    Within one of the text boxes within the report I have the following expression: ="Report showing sales at: " & Fields!Region.Value

    My problem is that there are too many regions so too much text in the text box of thr report when it initially renders. I'd like the expression to say "Sales for all Regions" when the report is initially rendered but the actual specific regions if and when they have been selected.

    Thanks in advance.

    BO

  • I am assuming you are displaying the selected parameters in the report. I don't have an answer for your question but just in case if you don't have to necessarily show the region selected in the report, then you might as well remove the placeholder which displays this information. I can't think of a better solution.

  • Assuming that the values for the "Regions" parameter come from a dataset, you can use the count function to get the number of records that are in the dataset and the .COUNT method on the parameter to work out whether all records are still selected.

    I have attached an example using "INFORMATION_SCHEMA.TABLES". It has a couple text boxes showing the counts and the value of the parameter which changes when all values are selected (which is the default).

  • This sounds like the perfect solution but I'm getting the following warning when I paste the code into my report item which prevents the report from rendering:

    Deserialization failed: The element 'Report' in namespace 'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition' cannot contain text. List of possible elements expected: 'Description, Author, AutoRefresh, DataSources, DataSets, Body, ReportParameters, Code, Width, Page, EmbeddedImages, Language, CodeModules, Classes, CustomProperties, Variables, DeferVariableEvaluation, ConsumeContainerWhitespace, DataTransform, DataSchema, DataElementName, DataElementStyle' in namespace 'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition' as well as any element in namespace '##other'. Line 2, position 167.

    Any ideas why this might be happening?

    BO

  • Worked out the issue and works great..

    Thanks for you help!

    BO

  • I know the question has been answered, but I want to show what I did.

    iif(Parameters!GFYID.Count=6,"ALL FYs",(JOIN(Parameters!GFYID.Value,", ")))

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply