Display Blank Tablix when using multi value parameter in SSRS 2008 R2
I have a main report which contains tablix1 and tablix2. Tablix1 is using DataSet1 and Tablix2 is using DataSet2. I have a multi value parameter set up with 71 items to choose from. My company owns 71 convenience stores and what I am doing is comparing sales
for a hard coded date in DataSet1 versus a hard coded date in DataSet2, sales for the same date 1 year ago. Pretty simple, works great when both datasets return data. However, we have a store that we opened up about 4 months ago. The data is displayed
in Tablix1, but since the store did not exist 1 year ago, there is no data for Tablix2. I have tried the "No Row Message" and Repeating Column and Row Headers, etc. When I choose all stores that existed last year, the report runs great. When I choose
a store that existed last year and our new store (#39) that did not, the report messes up. The below image, you can see Tablix1 is good, but Tablix2 should be blank and only show the column headers. Instead it moved Store #40's Tablix1 beside it. If I
run the report and just select store #39, Tablix1 runs as it should and Tablix2 shows The column headers and a blank row. It disappears as soon as I select multiple values.
When you click the next page button, you will see Store 40's Tablix2 where it's Tablix1 should be and then a blank space where Tablix2 should be.
Hi BassMan75,
According to your description, there is a main report with subreport, since the store did not exist one year ago, there is no data for the subreport. You want to show tablix grid even through there is no data in subreport, right?
Report data comes from datasets, if there is no corresponding value in the dataset, only column headers will be displayed in the report, we could not set the rows to blank, so we can’t achieve your goal directly. As a workaround, we can put one text box
in the report with the message: No data for the store. In this way, if there is no data meets search condition, the message will be displayed in the report. Please refer to the following steps:
Click and select the tablix.
In Properties window, in No Rows section, in NoRowsMessage text box, type No data for the store.
If you have any more questions, please feel free to ask.
Thanks,
Wendy Fu
Wendy Fu
TechNet Community Support
Similar Messages
-
How to set the default selection to "Select All" in a Multi valued parameter in SSRS 2008?
Hello Everyone,
How to set the default selection to "Select All" in a Multi valued parameter in SSRS 2008?
Regards
Gautam S
RegardsYou need to specify "Default Values" in the report parameter property. Choose similar option used in the "Available Values" option, this will allow the parameter to check "Select All".
Regards, RSingh -
Need to display the first 5 values of a Multi value parameter in SSRS report
Hi All,
I have SSRS report with multi value parameter. I need to display the parameter selection values in a text box. I've more than 50 records in the multi value parameter list. I've included the code to display "All" if I choose "select
all" option otherwise it will show the selected values. But, I need to change the logic. I have to show only the 1st 5 records if I choose more than 5 records.
How can I implement this?
I have used the below code
=iif(
Parameters!Country.Count = Count(Fields!Country.Value,
"Country")
,"All"
,iif(Parameters!Country.Count>5
,"Display the 1st 5 values"
,Join(Parameters!Country.Value,",")
Regards,
JulieHi Julie,
Per my understanding that you want to always show the first values from the param country to a textbox when you have select more then five values from the dropdown list, if you checked "select all", textbox will display "All", if
you select <=5 amount of values. it will display the selected values, right?
I have tested on my local environment and that you can create an hide parameter(Param2) to display just the first five values from the Country and when you select more then five values from country you will get the Join(Parameters!Param2.Value,",")
to display.
Details information below for your reference:
Create an new DataSet2 which the Param2 will get the values from:
SELECT TOP (5) Country
FROM tablename
Create an new param2 and hide this parameter, Set the "Available values" and "Default values" by select the "Get the values from a query"(DataSet2)
You can also Specify first five value for the "Available values" and "Default values", thus you will not need to follow the step1 to create the dataset2
Modify the expression you have provided as below:
=iif(Parameters!Country.Count = Count(Fields!Country.Value, "DataSet1"),"All" ,iif(Parameters!Country.Count>5 ,Join(Parameters!Param2.Value,","),Join(Parameters!Country.Value,",")))
Preview like below
If you still have any problem, please feel free to ask.
Thanks,
Vicky Liu
If you have any feedback on our support, please click
here.
Vicky Liu
TechNet Community Support -
CASE Statement in Where Condition with Multi Valued parameter in SSRS
Hi All,
I am little confused while using CASE statement in Where condition in SSRS. Below is my scenario:
SELECT
Logic here
WHERE
Date IN (@Date)AND
(CASE
WHEN NAME LIKE 'ABC%' THEN 'GROUP1'
WHEN ID IN ('123456', '823423','74233784') THEN 'GROUP2'
WHEN ABC_ID IS NULL THEN 'GROUP3'
ELSE 'GROUP4'
END ) IN (@GROUP)
So above query uses WHERE condition with CASE statement from @GROUP parameter. I want to pass this parameter as multi- valued parameter and hence I have used CASE statement IN (@GROUP).
For @Date one dataset will pass the available and default values and
for @GROUP parameters, another dataset will pass the available and default values.
But this is not working as expected. Please suggest me where I am making mistake in the query.
Maruthu | http://sharepoint-works.blogspot.comHi Maruthu,
According to your description, I create a sample report in my local environment. It works as I expected. In your scenario, if the selected values from the Date parameter contains some of the Date field values, the selected values from the GROUP parameter
contains some of GROUPS (‘GROUP1’,’GROUP2’,’GROUP3’,’GROUP4’) and the corresponding when statement is executed , then the dataset returns the corresponding values.
In order to trouble shoot this issue, could you tell us what results are you get and what’s your desired results? If possible, you can post the sample data with sample dataset, then we can make further analysis and help you out.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Hey,
I created a report in Reporting Services where I added multi-value parameter
( Filter). When I run my report, and try to select more than one parameter, I get an error: Incorrect syntax near ','
then i put in parameter expression : join(Parameters!Filter.Value,",")
and add : dbo.ufnSplit before calling parameter in query :
>>> set @valwhere = 'table.field IN (select * from dbo.ufnSplit(' + @Filter + ' , '',''))'
but i still have errors : incorrect syntax near 'text' which is the second value of the picklist of the parameter,
Please Any idea ?
Thanks !!I have sometimes had to collate as default with the SQL query
currently I've just using
CompanyName in
(selectitemfromdbo.fnSplit(@function,','))
In the SSRS report text box I have Join(Parameters!Company.Value,",") -
Display "blank-out" when using Maya with a GF 7800?
I have a problem where my LCD display occasionally blinks off for about 5-10 seconds when using Maya with a scene displaying about 100,000 polys. Has anyone else encountered this? This only seems to happen when I am quickly rotating the camera in a grey shaded perspective panel?
My LCD is a Dell 20" LCD (set at 1600x1200) connected to a Geforce 7800 in a Quad G5 with 4.5GB of ram.
I have never seen this issue before in Maya (I have been using Maya for years, on other machines), so I suspect it is hardware or driver related?OK, have completed several tests. I definately seems that the my Geforce 7800 has problems when running some applications. I wonder if anyone else has encountered this problem?
The easiest way to cause the display to momentarily shut off is to use Maya in the full screen perspective camera window in shaded mode. Proceed to rapidly move a 20,000 poly model (or greater) both zooming and rotating (the polys need to fill the entire screen and shake the mouse).My display (Dell 20" 2001fp) will blink-off for a few seconds. Of course, this in not "normal" work flow, but I have this issue happening when working normally, it can sometimes take time to occur.
I have tried the Geforce 6600 (256mb ver) and this does not occur with that video card. I have tried several mice both wired and wireless, plus changed the Energy Saver options for Processor performance (from comments I read on Macintouch.com). The problem is consistent to my Geforce 7800. This problem will also occur in Photoshop CS, by moving images and resizing, but I found it much harder to induce. -
How to sort via multi value parameter in ssrs
I have a parameter with multi values. when the user selects ,he get of options like acount name, first name, last name.
so if user selects firstname , the data has to sort by firstname.
if he selects acount name , the data has to sort by account name.
please help me how to sort the data using parameter with multivalue? in ssrs 2008.
Thank you?Hi Venku,
Based on your description, it seems that you create a parameter with available values and you want to sort the report data based on the parameter value. If the available values are the field names in the report, you can try to open the Tablix properties
dialog box and specify the sort expression on "Sorting" tab as follows:
=Fields(Parameter!parametername.value).value
If the parameter allow multiple values and you want to sort the report data by more than one field, for example, sort the report data by "accountname" and then by "firstname", please add two sort expressions as follows:
=Fields(Parameter!parametername.value(0)).value
=Fields(Parameter!parametername.value(1)).value
If you have any question, please let me know.
Regards,
Fanny Liu
Fanny Liu
TechNet Community Support -
Hi,
I have a parameter "MyTeam" (multi-select) which is a list of users.
I also have P1,P2,P3,P4,P5 as additional parameters.
My requirement is , When I select only 1 value in "MyTeam" , P1 should be filled with value selected and P2,P3,P4,P5 should contain "00-000-00".When I select 2 values in "MyTeam" , P1 & P2 should be filled with respective
values and P3,P4,P5 should contain "00-000-00".
I am using the below expression on P2,P3,P4,P5 and changing the Count accordingly, but it doesn't seem to work and I get the error below.....!!!
Example : This expression is for P2 and I am selecting only 1 value in "MyTeam".
=iif(Parameters!MyTeam.Count >= 2, Parameters!MyTeam.Value(1),"000000-00000000")
The Value expression contains an error: Index was outside the bounds of the array.
When I change my expression to =iif(Parameters!MyTeam.Count >= 2, "TRUE","FALSE")
, I get no error.
How do I resolve this..??
Thanks Uma.KHi kanumuri1987,
According to your description, you want to create a multivalued parameter, when you select some values from the drop-down list, other unselected values should be set to "000000-00000000".
In Reporting Services, if we have specified available values for a parameter, after processing parameter values, we can select expected values from drop-down list, at this time, those parameter values are fixed and they can’t be changed. So for your requirement,
it can’t be achieved currently.
If you have any question, please feel free to ask.
Best regards,
Qiuyun Yu
Qiuyun Yu
TechNet Community Support -
OpenDocument.aspx - pass multi value parameter when report type is actx
We are running Crystal Reports XI R2 against a business objects infoview server.
We have been successfully using the OpenDocuments method for opening crystal reports but have run into a snag. When using a multi-value parameter, we can only get it to work when the viewer is set to HTML. Setting to ActiveX prompts us to enter in the parameter values manually.
This address works (using sViewer=HTML):
http://vsx2af0x/businessobjects/enterprise115/infoview/scripts/opendocument.aspx?sType=rpt&sViewer=html&lsMpSiteIDs=[1235880],[1235891],[1235902],[1235913]&sPath=[Development][CGIS][Intranet Mapping][COS_Base]&sDocName=DetailedSite&sRefresh=Y
This address does not work (using sVIewer=actx):
http://vsx2af0x/businessobjects/enterprise115/infoview/scripts/opendocument.aspx?sType=rpt&sViewer=actx&lsMpSiteIDs=[1235880],[1235891],[1235902],[1235913]&sPath=[Development][CGIS][Intranet Mapping][COS_Base]&sDocName=DetailedSite&sRefresh=Y
Any thoughts on the problem?As I understand what you need is to use LookupSet function.
Suppose if your dataset is like this (for simplicity I'm showing only required fields)
PersonID Project Company
ID1 P1 C1
ID1 P2 C1
ID1 P3 C2
ID1 P4 C2
ID1 P5 C3
If you want to get the full project list for the person just send the PersonID alone and filter using it in the subreport. You can keep the project/company parameters optional in that case and put a default value. This would be the easiest thing.
Now if you want pass the project parameter also you need to pass it like this
=Join(LookupSet(Fields!Person.Value,Fields!Person.Value,Fields!Project.Value,"DatasetName"),",")
This would act like a self lookup and return you full list of projects for the person and then you can use this to set the parameter value in the subreport.
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page -
Use one value of multi value parameter in dataset query
I have a parameter @Period that is populated with posting periods from our financial system (e.g. 201301, 201302, 201303, etc.). It is set as a multi value parameter to allow users to choose multiple posting periods. This parameter
is used in my main dataset. If the user chooses 201301 and 201302, I want to choose the greatest value chosen and use it in a where clause such that MyPostPeriod <= @Period. Since @Period is a multivalue, the ><= won't work.
I read that SSRS just passes this as a comma separated value (201301,201302). How do I find the greatest value in the list and how do I use that in my where clause?
the user is selecting projects with activity during the posting period but then I want to grab all costs and invoices since the project was created. They choose to see activity in 201301 and 201302 but I need to get all invoices and costs <= 201302.
The only option I have been able to come up with is to have two parameters - one for start period and one for end period. Any better solutions? I'm not using stored procedures.
Milissa HartwellHi Milissa,
Based on your description, you want to get the Maximum value from a multi-value parameter. We can insert the selected values into a temp table and get the Maximum values. Suppose we have main dataset (DataSet1) include Period field, and a parameter Period
in the report. Please refer to the following steps:
Create another dataset named DataSet2 using the query below.
CREATE TABLE #Max (COL1 INT)
INSERT INTO #Max Values(1)
SELECT * FROM #Max
Double click DataSet2, change the dataset using the expression below:
="CREATE TABLE #Max (COL1 INT)" &
"INSERT INTO #Max VALUES (" & Join(Parameters! Period.Value,"),(") &")" &
"SELECT TOP 1 * FROM #Max ORDER BY COL1 DESC"
Create a parameter (Max) set the Data Type to “Integer”, and get the available values and default values from the DataSet2 COL1. Then, set the visibility to “Hidden”.
Double click the DataSet1, click Filters in the left pane. Fill with following values:
Expression: [Period]
Operator: <=
Value: [@Max]
Please refer to the following screenshot:
Regards,
Alisa Tang
Alisa Tang
TechNet Community Support -
Passing value to multi value parameter from SSIS using Report server webservice
Hi
I am triggering SSRS report from SSIS(Script task). I am passing parameter values from SSIS package.
So far working fine. Now, I have a report which has 2 parameters. One is single value parameter and the other is multi value parameter.
No issue assigning value to single value parameter. But how can I pass multi value to multi value parameter?
My code as below
ReportExecutionService rs = new ReportExecutionService()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
rs.Url = _webserviceURL;
rs.LoadReport(_reportPath, null);
ParameterValue[] paramval = new ParameterValue[2];
paramval[0] = new ParameterValue();
paramval[0].Name = "CountryCode";
paramval[0].Value = _countryNames;
**paramval[1] = new ParameterValue();
paramval[1].Name = "BusinessCode";
paramval[1].Value = _businessCode;****
rs.SetExecutionParameters(paramval, "en-us");
I am not sure how to pass value to BusinessCode(Multi value parameter)Hi Rajkm,
In order to pass a multi-value parameter through the Reporting Services Web services, you need to define the same numbers of ParameterValue objects as the number of the values of the multi-value parameter being past into the report. The Name property
of these ParameterValue objects must be specified same to the parameter name.
I found a good FAQ article for this scenario:
How do I pass a multi-value parameter into a report with Reporting Services Web service API?:
http://blogs.msdn.com/b/sqlforum/archive/2010/12/21/faq-how-do-i-pass-a-multi-value-parameter-into-a-report-with-sql-server-reporting-services-ssrs-web-services-api.aspx
Hope this helps.
Elvis Long
TechNet Community Support -
How to design SSRS report to filter multi-value parameter?
I developed an RDL which takes a multivalue parameter and I want to set a visibility expression or filter based on this parameter. This parameter uses an "All" value equal to '660E4583-7F29-4D37-8038-5096AE6A1A7F'.
I want to make the main tablix visible if this parameter is set to this uniqueidentifier and invisible otherwise. How can I achieve this either in the tsql dataset or on the report side? I have tried numerous workarounds, but none have worked so far! I've tried
different expressions and datatypes.
Before I tried If/Else statements in the tsql dataset, but most recently I instead added flags to the tsql dataset for each condition and am trying to make this tablix only include the records with the flag matching the parameters chosen. But even this is not
working for me.
Here is sample data:
create table #dummydata
parameter varchar(max),
b varchar(max)
insert #dummydata values('660E4583-7F29-4D37-8038-5096AE6A1A7F','record 1'),('660E4583-7F29-4D37-8038-5096AE6A1vcd','record 2'),('660E4583-7F29-4D37-8038-5096AE6A1v52','record 3')
select * from #dummydata
And my filter expression in the RDL for this tablix is:
=iif(Parameters!Modifier.Value(0)="660E4583-7F29-4D37-8038-5096AE6A1A7F",1,0)
With datatype = integer and value = 1 However, this tablix is invisible with the above even when I choose "All" for the parameter value = default value. How can I make this tablix visible?
Ryan DHi Ryan D,
After testing the scenario in my local environment, everything goes well. As per my understanding, I think this issue can be caused by the Available values in the Modifier parameter. Could you tell us the Available values of Modifier parameter in your scenario?
The following scenario in my test is for your reference:
I create a dataset with the sample data you posted.
Add a multi-value parameter named Modifier in the report.
Specify the following values in the Available Values of the parameter (please note that the value “All” should be located in the first place, because we use Parameters!Modifier.Value(0) in the filter):
Label: All Value: ="660E4583-7F29-4D37-8038-5096AE6A1A7F"
Label: A Value: ="1"
Label: B Value: ="2"
Label: C Value: ="3"
Drag a table to the design surface, insert parameter and b fields in the table.
Use the same expression as you said to add a filter in the tablix.
We can refer to the following screenshot:
If there are any other questions, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Passing multi value parameter to the Drill through report
Hi
I have two reports say Report A and Report B.
Both reports using same parameters.
I am Navigating from Report A to Report B using Jump to Report option.
Now when I pass multiple parameter to the Report B it only displays first parameter results.
In report B I have parameter multi value select to true.
I would like to know if its possible or not to pass multi value parameter in drill through report?
I would appreciate if someone can help me here.
Regards
AmitYes you can pass multi value parameters to a drill through report.
It works similar to multi value parameters for subreports, which is discussed in detail in this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=163803&SiteID=1
-- Robert -
Multi Value Parameter in SP error in Crystal Report SAP B1 ?
Hi Experts ,
i am Getting an error in Crystal Report
"Failed to retrieve data from the database. Details: 42000:[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '('. [Database vendor code: 120]"
I an executing the SP In Command , I want to pass multi value parameter in SP
When Pressing ok
than On Ok Button Error come
So I have Some Question
1> Why All parameter in Commend Are Automatic getting Compulsory and How to Avoid It?
2> How to Solve this error ? this error is only coming with multivalued parameter ?
i have many report in which i have to send the multi value parameter into query it self so , Plz Help Me
I am New to Crystal Report so it will be Kind Of you if explain with example .
Thankks in Advance !!!
Regards,
Mayank ShahHi Shachar,
i will explain one because i think some thing is misunderstood
please the images
when all parameter record selected and no parameter record selected ... i want all record should display
this blank report is problem
Regards,
Mayank Shah -
Reporting Services Multi Value Parameter
I have an SSRS 2005 report that I want to enable for multi value. However, I always run into the issue with the way it passes multiple values. How exactly do I get a multi-value parameter setup and working on both the report AND SQL side?
I used the MS example of checking the multi checkbox for the parameter and then using a WHERE Column IN (@MultiParam), but this doesn't work. When you select one item, or is it multiple I can't remember, it fails. I really appreciate the help!
Nathon Dalton
Software Developer
Systems Administrator
Network Administrator
Blog: http://nathondalton.wordpress.comHere's a sample of the SQL stored procedure that I use to get the dataset:
Create
proc [dbo].[spStoredProcName]
@supervisor
varchar(max)
as
begin
create
table #tempSups
Supervisor
varchar(62)
declare
@i
int
select
@i = 0
select
@i =
charindex(',',@supervisor
begin
if @i
<> 0
while @i
>0
begin
insert
into #tempSups
values
(ltrim(rtrim(left(@supervisor,
@i-1))))
select @supervisor
=
right(@supervisor,
len(@supervisor)
- @i)
select @i
=
charindex(',',
@supervisor)
end
end
insert
into #tempSups
values
(ltrim(rtrim(@supervisor)))
From there, simply join your query to the temp table
Maybe you are looking for
-
I want to switch to the u.s store as I now live in the us, I cannot switch stores because my balance is $1.41 in the oz store and needs to be zero, how can I get rid of the $1.41 when everything costs more or less than that? I do not have a credit ca
-
Credit Check on Open Items number of day
Hi We have setup automatic credit control and all seems to work fine, we now want to expandon this to include open items. So we have created a static block on open items. The next step was to only include open itesm that have been open for longer th
-
ALV Grid - capturing the data of checked records
Hi All, I have a report with ALV Grid display and it displays the contents of a custom table. Each record has a CHBOX, and I want to capture the data of all checked records in to an internal table when 'create Order' button is pressed. Please help m
-
Best practice - transitions without state?
I'm noticing that, sometimes, its easier to just do a Transition on a component without having the changes in a State. For example, I can't seem to get a sequence of Resize effects when the properties are set in State, but I succeed when I empty out
-
Transfer library and songs on ipod to new computer
so heres my case. i just got a new laptop, dell latitude and i wanted to download my songs from my ipod to my new computer, is there a way to do it without copying all my song from other computer and downloading it to my new. can i just download it o