SSRS Report with mutli select values in parameters
Hi All,
I am creating a SSRS report and displaying the result in tablix. I want to make the report to filter by multi select values from the parameters.
I have 3 parameters. For all the three parameters, I have set "Default Values" and "Available Values". Also, modified my result dataset to get the values from parameters using "WHERE ID = @Parameter1" (example) and so
on..
3 Parameters types: 1. Yes or No
2. Date 3. Values with NULL in the DB
Problems:
1. When I am passing the default values "Yes" "No" - it is throwing errors because default values is passed as Yes "AND" No instead of "OR" condition. The value stored in the DB wil have either Yes or No but not both.
2. When I am querying the date values, it is a DateTime field in the DB. But I have queried like SELECT CONVERT(DATE, EXE_DATE) AS DATE FROM table which is giving only date in SQL but in SSRS displaying date with time.
3. When I pull the list of values for third Parameter from SQL, it has some NULL values. When I try to use it in SSRS, it is not displaying the NULL value as select option in the list of values
Any suggestions for the above three problems for SSRS with multi select values as filter will be helpful.
Maruthu | My Blog
Hi Maruthi,
Regarding the three things:
1.) I believe your first parameter is mutliselect , please convert it to single select.
Steps:
a.) Select the parameter, right click and go to parameter properties
b.) Under General Tab in DataType section remove the checkbox for Allow Multiple Value.
2.) Instead of returning as the date please return string. For example :
SELECT CONVERT(VARCHAR, GETDATE(),101)
Here is the list of conversion : http://www.sqlusa.com/bestpractices/datetimeconversion/
3.) As such there is no concept of null in SSRS. (Its a relational concept) . We do have nothing , which means empty. In Order to use null please select the Allow null option in the DataType section of the Parameter, This will add an checkbox for null in
the report preview. Its developer job to handle the null values in there query.
Regards Harsh
Similar Messages
-
Hello everyone,
I created following calculated member in MDX query. I am using it in one of the report parameter in dataset (single select dropdown list as report parameter).
WITH MEMBER [Measures].[ParameterCaption] AS
CoalesceEmpty([Customer].[National Account Code].CURRENTMEMBER.MEMBER_CAPTION,'None')
I would like to display 'None' text at the top of the dropdown list values. So that when user selects 'None' then this parameter will not considered in MDX query else the selected National Account Code will be considered to filter report data. But,
the above return blank/empty value for [Customer].[National Account Code].& member though I specified 'None' as text in CoalesceEmpty function. Any advice would be appreciated.
Thanks, Ankit Shah
Inkey Solutions, India.
Microsoft Certified Business Management Solutions Professionals
http://www.inkeysolutions.com/MicrosoftDynamicsCRM.htmlHi Ankit,
It seems that you issue had been solved in your another thread.
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/5a5becac-226f-428a-95b0-aaaa22733818/ssrs-report-with-tabular-model-create-a-dropdown-report-parameter-with-none-option-as-the-top?forum=sqlanalysisservices#0e51bf8c-a66c-4df5-a244-0147728fdfdb
iif([Customer].[National Account Code].CURRENTMEMBER.MEMBER_CAPTION="","None",[Customer].[National
Account Code].CURRENTMEMBER.MEMBER_CAPTION)
I marked this reply as answer, it will benefit to other members who have the similar issue.
Regards,
Charlie Liao
TechNet Community Support -
SSRS reporting with sharepoint list using Distinct and Multivalue parameters
i want create ssrs report with sharepoint list using ms-vs(2008). i want create Distinct multivalue parameters by using CAML query. There is any way we put CAML query where we use Distinct keyword and IN clause in CAML query... i hope all experts will
understand my poor English... sorry for poor English.. plz help meHi AsifMehmood,
Per my understanding you have create an SSRS report with SharePoint list, now you don’t know to create the distinct parameters by using CAML query, right?
For the CAML language doesn’t have any reserved word (or tag) to set this particular filter to remove duplicate results, but we can use the custom code to do this function. I have tested on my local environment and we can do that by create one hidden parameter(Param1)
to get all the values from the fields which will add the filter and then create another parameter(Param2) to get the distinct values based on the Param1, we use the custom code to do the deduplication.
Step by Steps information in below thread for your reference to create the parameters and the custom code:
"How to get distinct values of sharepoint column using SSRS"
Other similar thread for your reference:
https://audministrator.wordpress.com/2014/02/17/sharepoint-list-add-distinct-parameter-value/
If your problem still exists, please feel free to ask and also try to provide us more details information.
Regards
Vicky Liu -
BI: Virtual Provider for ECC Report with same selection parameters
Dear all,
I have attached screen shot of ECC report selection screen with contain Material, Plant and Dates. As report is bit complex and I need to use just ITAB (internal table) of it for further use in BEx Query and for Dashboard purposes.
Problem: I need to call this report by creating Virtual Provider in BI so that I get data from ECC at runtime as it is shares report so I can't able to save any data in transparent table as report calculated opening balances at runtime.
It is possible for me by using function module i can get itab by submit return and then create Data Source for it ?
As i make copy of FM ZZRSAX_BIW_GET_SIMPLE i cannot use submit there due to OPEN CURSOR mechanism there.
Kindly anyone suggest how it is possible to call report with same selection parameters for creation of virtual provider.
Please mention if i miss any point in explaining problem.
Feel free to ask for any query.
Many thanks.
Hoping for positive and quick responses.please create 2 reports as given below.-
REPORT ZSZP_00007.
parameters a(5) .
parameters b(5) .
parameters c(5) .
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'A' or screen-name = 'B' .
get parameter id 'aaaaaaaaaaa' field a.
get parameter id 'bbbbbbbbbbb' field B.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
start-of-selection.
your logic
REPORT zszp_00005.
PARAMETERS a(5).
PARAMETERS b(5).
START-OF-SELECTION.
SET PARAMETER ID 'aaaaaaaaaaa' FIELD a.
SET PARAMETER ID 'bbbbbbbbbbb' FIELD b.
your logic
SUBMIT zszp_00007 VIA SELECTION-SCREEN.
i hope this approach will solve your problem.
thanks
Swanand -
Issue when Run Report with Hier selection in the Portal
Hi Portal BI Experts,
we are finding a strange issue when Running the Report.
the following Variables are in the Report Selection screen :
Company code [optiona]
Prod.Variance Type [ mandatory]
Hierarchy Node Variable [optional]
TheQuery which I am Running thro Bex Analyzer with the Hier selection as below , is working fine. But
When I run thro portal with Hier selection value with 00/50/G310/702258(0CUST_SALES
It automatically display as +00/50/G310/702258(0CUST_SALES with + symbol. and thro the error:
Input "\+00/50/G310/702258(0CUST_SALES);\+00/51/G410/703096(0CUST_SALES)" for Ship-To Party (Sales has invalid format
If I remove the plus symbol report runnig fine.
Your immediate help highly appreciated.
Thanks
Hema
Edited by: hemav on Mar 21, 2011 2:29 PMHi Jaya,
This is the Error message I am facing when I Execute ithe query report n the Web[Portal]
Input "\+00/50/G310/702258(0CUST_SALES);\+00/51/G410/703096(0CUST_SALES)" for Ship-To Party (Sales has invalid format
ie. In the variable screen the selected hier value automaticvally display with plus symbol
Actual Hier value : 00/50/G310/702258(0CUST_SALES)
Once close the Hier selection list window , the Hier value turned to +00/50/G310/702258(0CUST_SALES)
If I give ok with this Plus symbol it throwing the above error. By removing the Plus symbol manually it is working fine.
I unable locate the settings.
that too when I run the same report in Bex Analyzer woking fine , no issues in the Hier value.
Thanks ,
Hema -
Submit report with dynamic selections
Hi All,
I am trying to Submit a report with dynamic selections. I am using the option SUBMIT REPORT WITH FREE SELECTIONS.
But the dynamic selections are not getting passed.
Request you to kindly provide some inputs
My code is
DATA: trange TYPE rsds_trange,
trange_line LIKE LINE OF trange,
trange_frange_t_line LIKE LINE OF trange_line-frange_t,
trange_frange_t_selopt_t_line LIKE LINE OF trange_frange_t_line-selopt_t,
texpr TYPE rsds_texpr.
trange_line-tablename = 'PA0002'.
*trange_frange_t_line-tablename = 'PA0002'.
trange_frange_t_line-fieldname = 'GBJHR'.
trange_frange_t_selopt_t_line-sign = 'I'.
trange_frange_t_selopt_t_line-option = 'EQ'.
trange_frange_t_selopt_t_line-low = '1987'.
trange_frange_t_selopt_t_line-high = '1987'.
APPEND trange_frange_t_selopt_t_line TO trange_frange_t_line-selopt_t.
APPEND trange_frange_t_line TO trange_line-frange_t.
APPEND trange_line TO trange.
CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'
EXPORTING
field_ranges = trange
IMPORTING
expressions = texpr.
submit RPCADVQ0
VIA SELECTION-SCREEN
WITH SELECTION-TABLE rspar_tab
WITH FREE SELECTIONS it_texpr
and returN.
Kindly provide your inputs
Regards
ReshmaHi Reshma,
Use the FM - RS_REFRESH_FROM_DYNAMICAL_SEL before FREE_SELECTIONS_RANGE_2_EX.
data: trange type rsds_trange,
g_repid type sy-repid.
g_repid = 'RPCADVQ0'.
call function 'RS_REFRESH_FROM_DYNAMICAL_SEL'
exporting
curr_report = g_repid
mode_write_or_move = 'M'
importing
p_trange = trange
exceptions
not_found = 1
wrong_type = 2
others = 3.
if sy-subrc eq 0.
" Do the changes to the trange
CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'
EXPORTING
field_ranges = trange
IMPORTING
expressions = texpr.
submit RPCADVQ0
VIA SELECTION-SCREEN
WITH SELECTION-TABLE rspar_tab
WITH FREE SELECTIONS it_texpr
and returN.
endif.
Cheers,
Kothand -
How to create a SSRS report with SharePoint 2013 team site's calendar?
Hi I have sp13 and SQL Data Rool (that brings up VS Shell 2010).
I need to build a report where the top part is to have a SP Team site's calendar for up coming week. The 2nd half would be a table with data from that same site. This report would then need to be embedded in a email that automatically sent to several
users on weekly basis.
I have the table data report created form the SP list. How can I get the calendar(display as a calendar that I see in the team site) on to the top part of this report?
Thank you.Please follow this article to write SSRS reports with data source as SharePoint list/calendars etc. All document libraries, list and calendars are derived from base list class so you can use any of this type as a data source
http://www.mssqltips.com/sqlservertip/2068/using-a-sharepoint-list-as-a-data-source-in-sql-server-reporting-services-2008-r2/
Once your SSRS report is developed, you have multiple ways to show it in SharePoint
- upload to SSRS server and show in sharepoint in a page viewer web part or simply open it as a link in new window
- configure SharePoint environment with integration to SSRS and upload report to SharePoint library. Display report in a web part page using SSRS web part.
Moonis Tahir MVP SharePoint,MCTS SharePoint 2010/2007, MCPD.net, MCSD.net, MCTS BizTalk 2006,SQL 2005 -
Report with goods receipt value and invoice posting value
Is there any standard report with goods receipt value and invoice value (the value with which invoice is posted.
Hi
Please check MC$4 transaction, mey be helpful.
regards
Srinivas -
Drill down to a report with a select view
I have a report with a select view on a column... In this column I have coded a navigation to another report that has some details and also has a select view on the same column.
a) The only way to make this work is in the construction, using the view edit screen, the select view, select the option, save it... and then in the criteria, code the navigation.
This had to be done to every option.
b) Since the target report has also a select, whenever you navigate from the original report, the detail report is displayed "as it were", in respect to the select column... The target report is filtered by this column (I am using "is prompted") It would be nice if besides the filtering the select could show the select that comes from the original report... It is not working like this... The user has to select again (column selector) to see it like the original one...
Sorry, it is a bit confusing...but I´d appreciate any help.
Txs.AntonioI dont think about drill down, but try with navigation using common columns. in this way we can have both side navigations summary-> detail and detail->summary.
-
How to integrate SSRS Reports with Sharepoint
Hi Friends,
I just wanted to know the steps to integrate our SSRS Reports with Sharepoint.
What are the prerequisite for integration of ssrs 2008 reports with sharepoint.
Thanks in Advance...
Regards,
LuckyAbdulsee
http://technet.microsoft.com/en-us/library/bb326356(v=sql.105).aspx
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
SSRS report with tabular model - MDX query to filter parameter data based on Tuple value.
Hello Everyone,
I am working on SSRS report in which a tabular model is being used as a backend.
I want to filter the report parameters which are dependent to other parameters. Like, country, state, and cities drop downs.
All are multi-select parameters. I am using MDX queries to filter the parameters data.
Based on selected one or more countries, the data of states needs to be filtered.
The point is the text which is being displayed in state dropdown for each state name is combination of 3 different members.
So, I created the following Tuple for the same and can see the expected display names in states dropdown.
"("+
[Location].[Code 1].CURRENTMEMBER.UNIQUENAME +","+
[Location].[Code 2].CURRENTMEMBER.UNIQUENAME +","+
[Location].[Descr].CURRENTMEMBER.UNIQUENAME +")"
Now, when I would like filter the cities data based on selected one or more states, I am unable to pass the multiple Tuples (more than one selected Tuples) as parameter for cities dropdown.
The following is my query for City parameter. It is working well when I select only one State from the dropdown.
However, when I select multiple states, it is unable to convert the Tuple into SET in ELSE part of IIF condition specified in following query.
Can anybody help me how to resolve the error that I am getting about STRTOSET function?
Or
Are there any other alternatives to achieve this requirement?
Any help would be much appreciated.
Query:
WITH MEMBER [Measures].[ParameterCaption] AS [City].[City Business].CURRENTMEMBER.MEMBER_CAPTION
MEMBER [Measures].[ParameterValue] AS [City].[City Business].CURRENTMEMBER.UNIQUENAME
MEMBER [Measures].[ParameterLevel] AS [City].[City Business].CURRENTMEMBER.LEVEL.ORDINAL
SELECT {[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel]} ON COLUMNS ,
[City].[City Business].Children ON ROWS
FROM (
SELECT ( STRTOSET(@State, CONSTRAINED) ) ON COLUMNS FROM [Model])
WHERE ( IIF( STRTOSET(@State).Count= 1,
STRTOTUPLE(@State, CONSTRAINED),
STRTOSET("{
("+
[Location].[Code 1].CURRENTMEMBER.UNIQUENAME +","+
[Location].[Code 2].CURRENTMEMBER.UNIQUENAME +","+
[Location].[Descr].CURRENTMEMBER.UNIQUENAME
+ ")
}",CONSTRAINED )) ) CELL PROPERTIES VALUE
Thanks, Ankit Shah
Inkey Solutions, India.
Microsoft Certified Business Management Solutions Professionals
http://www.inkeysolutions.com/MicrosoftDynamicsCRM.htmlHi,
I used following dynamic query in expression of dataset of parameter and it works like a charm.
"WITH MEMBER [Measures].[ParameterCaption] AS [City].[City Business].CURRENTMEMBER.MEMBER_CAPTION "&
"MEMBER [Measures].[ParameterValue] AS [City].[City Business].CURRENTMEMBER.UNIQUENAME "&
"MEMBER [Measures].[ParameterLevel] AS [City].[City Business].CURRENTMEMBER.LEVEL.ORDINAL "&
"SELECT {[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel]} ON COLUMNS , " &
"[City].[City Business].Children ON ROWS " &
" FROM [Model] WHERE ({"& join(Parameters!Location.Value,",") &"}) CELL PROPERTIES VALUE"
Thanks, Ankit Shah
Inkey Solutions, India.
Microsoft Certified Business Management Solutions Professionals
http://www.inkeysolutions.com/MicrosoftDynamicsCRM.html -
Hello Everyone,
I would like to create SSRS single select dropdown list parameter (it is using MDX query in dataset) with "None" option at the top. Note: this parameter is dependent parameter and getting filtered based on the selection of another parameter.
How can I add hard-coded "None" text at the top of the parameter values? Can Union function help me to add this hard-coded value? The purpose is, when user selects None from the dropdown ignore the condition of the parameter from MDX query else
use the selected value in query condition.
Thanks, Ankit Shah
Inkey Solutions, India.
Microsoft Certified Business Management Solutions Professionals
http://www.inkeysolutions.com/MicrosoftDynamicsCRM.htmlHi Ankit,
In your scenario, you can achieve your requirement in report level other than in query. Add a Filter like:
Expression: =IIF(Parameters!Name.Value="None",1,Fields!Name.Value)
Operator:=
Value: =IIF(Parameters!Name.Value="None",1,Parameters!Name.Value)
In this case, report will ignore this parameter, and show all the records on the report when selecting “None” value. I have tested it on my local environment, the screenshots below are for you reference.
Reference:
Add a Filter to a Dataset (Report Builder and SSRS)
Regards,
Charlie Liao
TechNet Community Support -
What is the best way to create a SSRS Report with Header Data and its associated child data
So I have Member Information...Member ID...Member Addressing...etc.. I want to display this in the top part of the report like...
Member Name:
Member ID:
Member Address Line 1:
And then below I want to report on all the claims associated with a Member ID that is chosen by the Parameter. Obviously the Claim Data will be in Table format. Do I necessarily have to associate the Member Information with the Claim Information or simply
use the same parameter? And what is the best Toolbox item to use to display the Member Information on top?
Any help or guidance is greatly appreciated by this newbie.
Thanks for your review and am hopeful for a reply.
ITBobbyPHi ITBobby,
According to your description, you want to display all Claim Data for each Member. Right?
In Reporting Services, we can use a table to display those Claim Data and make them group on Member ID. If you want to display the Member Information, we can put the data fields on parent group level. Then we can use create a parameter to filter the Member
ID we need. We have tested this scenario in our local environment. Here are steps and screenshots for your reference:
1. Create a DataSet(DataSet1) which contains the data fields of Member and Claim.
2. Create a table and drag the Claim data into the table.
3. In Row Group. Right click on Details and add a parent group.
4. Select Member_ID in Group by.
5. Right click on the textbox of Claim data. Select Insert Row->Outside of Group-Above. Drag the MemberName into the inserted row.
6. In Report Data, right click on Parameter-> Add Parameter.
7. Type Member_ID in Name and Prompt, select allow multiple values.
8. In Available Values, select get data from a query. Choose DataSet1, select Member_ID in values and label. You can also set this in Default Values if you need.
9. Save and preview.
Reference:
Understanding Groups (Report Builder and SSRS)
Report Parameters (Report Builder and Report Designer)
If you have any question, please feel free to ask.
Best Regards,
Simon Hou -
Multiple select parameter with each selected value covering multiple sub values
Hello, everyone,
In my SSRS report, I need to set a multiple select parameter called Group, with values: group1 group2, etc....
When group1 is selected, it needs to apply to data of certain sub groups: sub-group1, sub-group2;
When group2 is selected, it needs to apply to data of different sub groups: sub-group3, sub-group4 and sub-group5;
when both group1 and group2 are selected, then, it needs to apply to data of sub-group1 to sub-group5.
I know how to do it when only one group is selected: simply use a case statement in the query to select the right sub groups based on the group selected.
But I don't know a good way to do it when multiple groups are selected.
Any help, pointers are much appreciated. Thanks in advance!
RegardsHi QQFA,
If I understand correctly, there are two parameters (Group and Sub_group) in the report. When we select group1 in Group parameter, it will auto select sub-group1, sub-group2 in the Sub_group parameter; when we select group2 in Group parameter, it will auto
select sub-group3, sub-group4 and sub_group5 in the Sub_group parameter; when we select both all, it will auto select all sub_group values. If I have misunderstood, please don't hesitate to let me know.
In this scenario, we can create a temporary table with Group and Sub_group columns, then select Sub_group column values based on the Group field. For more details, please see:
Create a dataset with the query below:
CREATE TABLE #temp([group] nvarchar(50),sub_group nvarchar(50))
INSERT INTO #temp VALUES ('group1','sub-group1'),('group1','sub-group2'),('group2','sub-group3'),('group2','sub-group4'),('group2','sub-group5')
SELECT * FROM #temp
where [group] in (@Group)
Set available values and default values of Sub_group parameter with get values from the sub_group field in the new dataset.
Note that the two parameters are all multiple parameters.
If there are any misunderstanding, please elaborate the issue for further investigation.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Creating a SSRS report with dynamic overlapping images
I have to create a report with the following requirement:
1: The first page has some hi-res images of 8 different geometric shapes with text in it. The location of the images on the page will be static, however the fill color of image can be either green or grey.E.g. one box can be green for one user , for other it
can be grey etc.
2: Export the report in excel,pdf and word
I am planning to use SSRS for this.
I am planning to create the report with superimposed images, e.g. green palette shape and grey palette shape superimposed on each other .Depending on the selection made by the user, I want to "Send to Back" or "Bring to Front." Can I change
the "Send to Back" or "Bring to Front" properties at runtime depending on parameters passed to the report?
Also, I want the image path to be configurable, so that when business wants to change the text or color of the image, I do not need to redeploy the code. I can just change the image.
how can I create the RDL such that the images are at the proper positions? DO I need to insert a tablix for proper positioning of the image?
Any suggestions?Hi RachanaD,
As far as I know, overlapping of item does not work in the soft-break renderers like HTML, Word and Excel. However, it is work in hard-break renderers like PDF or TIFF.
In your case, we can insert text box in rectangle to work around the issue. We can insert an image in rectangle and another image insert in a text box. Then, put the text box in the rectangle.
In SSRS, we cannot use parameter to control the location of image. However, we can use go to report action to work around the issue. Please refer to the steps below:
Create two similar report, the difference between two reports is the location of these image.
In the first report, add a text box fill with “Send to Back”.
Add action “go to report” of the text box go to the second report.
In the second report, add a text box fill with “Bring to Front”.
Add action “go to report” of the text box go to the first report.
Hope this helps.
Regards,
Alisa Tang
If you have any feedback on our support, please click
here.
Alisa Tang
TechNet Community Support
Maybe you are looking for
-
How to install & confgiure Oracle9i on Veritas Cluster Server
Hi, I want to know how to install oracle9i on Veritas Cluster Server having OS as Solaris 9. Also How to configure oracle in VCS so that it can be failover. I really appreciate the replies. Thanks, Shrikant
-
Problems with French Characters in Page Title
Here is the problem When using Duplicate Page and trying to set page titles with french characters (or other non standard characters for that matter such as qoutes) The resulting output does not display correctly. I thought a work around would be to
-
I have a requirement to generate PDF reports through a java application. Is iText the preferred solution to do this or can anyone recommend a better alternative? Thanks.
-
I've had my WRT110 for about 3 years or so, and it has worked fine for a long time. Today my computers were connecting to the router, but weren't getting internet access so I did the following: checked lights on router and modem, they all indicated
-
License Information for 11gR2 Standard Edtion
Hi, Can any one please help me for the below points. 1) How many MAX Standard Edition's License a Company can take. 2) Where can we find the Licensing and Cost information for 11gR2 Edition's. Thanks & Regards, Poorna Prasad.S