October 8, 2009 at 11:56 am
I have 5 parameter controls in my report. I would the ability to use as many or as few of the 5 controls as possible. When I try to skip an input, I get a warning that says I have to make a selection from that parameter. Is there any way I can run a report with just selecting a couple parameters and leaving the rest blank?
October 11, 2009 at 11:18 pm
each parameter can allow blank values but can your script or sproc handle the blank values - you would need to set that up too
October 12, 2009 at 6:12 pm
Thanks...I am really new to this. How would I allow my statement to handle this?
October 13, 2009 at 6:23 am
Hello,
please take a look at my statement....is this where I would make my changes, so that I don't have to choose all of the 5 parameters? Thanks!!
SELECT [CWS Division], Zone,
COUNT(1) AS Count, SUM(CASE WHEN ISNULL([Status],'x') = 'Won' THEN 1 ELSE 0 END) AS NumberOfWins,
SUM(CASE WHEN ISNULL([Status],'x') = 'Won' THEN 1 ELSE 0 END)* 100 / COUNT(1) as WinPercent
from new_call
WHERE ([Sales Rep] IN (@salesrep)) AND (Status IN (@status)) AND ([CWS Division] IN (@division)) AND ([Date Quoted] >= @start_date) AND
([Date Quoted] < DATEADD(Day, DATEDIFF(Day, 0, @end_date) + 1, 0))
GROUP BY [CWS Division], Zone
October 13, 2009 at 9:55 pm
you can right click in BIDS in the report template to get to parameters properties and allow it in the parameter.
The script just has to be written with a default value.
So
Create procedure abc
(@Date DATETIME = NULL)
AS
SELECTE ....
WHERE Date >= ISNULL(@Date, '1/1/1900')
or something similar.
Books Online can really shed some light on the subject. I would highly suggest reading up on some of SSRS functionality.
October 14, 2009 at 2:30 am
For the report parameter tick 'Allow blank /Null' checkbox
and in the backend storeprocedure assign the initial value (default values) to parameters in the declaration section. Default value will be used when the parameter value is null/blank
@QualityGrade Char(1) = 'A'
October 14, 2009 at 4:12 am
Thank you all....I figured it out
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply