Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SSRS Paramaters Expand / Collapse
Author
Message
Posted Wednesday, April 10, 2013 1:57 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, August 21, 2014 1:59 PM
Points: 143, Visits: 371
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



Post #1441004
Posted Wednesday, April 10, 2013 7:02 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, September 10, 2014 12:22 PM
Points: 22, Visits: 159
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.
Post #1441080
Posted Wednesday, April 10, 2013 10:39 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 1:00 AM
Points: 2,993, Visits: 2,590
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).





  Post Attachments 
Report1.txt (6 views, 10.71 KB)
Post #1441104
Posted Thursday, April 11, 2013 3:05 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, August 21, 2014 1:59 PM
Points: 143, Visits: 371
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
Post #1441142
Posted Thursday, April 11, 2013 2:39 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, August 21, 2014 1:59 PM
Points: 143, Visits: 371
Worked out the issue and works great..

Thanks for you help!

BO
Post #1441479
Posted Friday, April 12, 2013 7:23 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, February 19, 2014 9:42 AM
Points: 27, Visits: 102
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,", ")))
Post #1441686
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse