Skip to main content

Lesson 14: Parameter session 2 in SSRS.

How to create date parameter with calendar in SSRS.

  • After creating the datasource, while creating the dataset include the where clause which consists of date as below.

  • Now go to parameter properties and change the datatype from text to date/time, once adding the required fields in the table, preview the results to select the date from calendar.
  • Below snip shows how the date parameter is displayed in the preview with calendar symbol beside to it.

How to use radio button parameter in SSRS.

  • In the where clause of dataset query use the column with boolean datatype. Next go to parameter properties select the datatype as Boolean.

  • Now if you preview the results you can see the option to select true or false where true indicates 1 and false indicates 0.

How to allow Null value parameter option to pass Null value.

  • While creating the dataset, we need to first convert the NULL value present in a column to string(it can be any string) because SSRS doesn't allow to compare NULLS. As shown below, in the where clause use the IsNULL function to convert the parameter value to string, also we need to convert the value coming from parameter to string as shown below.


  •  Next go to parameter properties enable the option- Allow null value.



  •  As shown below when you preview the results the NULL value is passed and results are displayed. When you want to see all the values of that parameter in the database , create a dataset to select distinct values and assign the dataset to parameter to fetch available values from a query. Now as shown in the last image you can have an option to select both NULL and other values of the parameter if any .




Comments

Popular posts from this blog

Lesson 57: Auto refresh the report in SSRS

                     How to Auto refresh the report in SSRS. Firstly create a datasource,dataset and select the required fields into the table/matrix. If you want to refresh the report frequently for every second you can change the Auto refresh as 1 in the properties of the report. If you want to change the color of a field after given period of time to change the expression of the color in properties as a follows and set the Auto refresh time to the required period of time in the report properties.

12th Day

Conditional statement in SSIS: same as ternary operator in C ** <condition>? <true>:<false> Eg: Gender=="M" ? "Male": "Female" Multicast Transformation : This t/r creates multiple copies of i/p data. it is useful because every time we need not to go to source. ** This will improve task performance. Aggregate Transformation : It is used to convert the detailed values into aggregated data by using Aggregate functions like sum,avg,max,min,count etc. ** It is Asynchronous transformation. Example: to the i/p data from source group by deptno and perform aggregate funcs. Conversion in SSIS ; * Conversion is very important because data from flat file, excel comes to transformations in the form of string(varchar) , so we cannot perform required operations so it require to convert data. 1) Directly at source level : ** Select flat file source, right click--> show advanced editor. ** Select i/p & o/p properties tab, ...

Lesson 67: Join two datasets in SSRS by using Lookup function

How to join two datasets in SSRS by using Lookup function First create two datasets each one with a different datasource. Next insert a table in the report body and insert the required columns from the dataset1. Next in order to insert the columns from 2nd dataset, you need to write a look up function where you need to give the matching columns from both the datasets and the required column from dataset and scope as 2 datset Here since we are inserting the columns of dataset1 first, we are writing exp with scope as dataset 2.