SlideShare a Scribd company logo
SSRS Expressions
 To display the current data and Time 
=Now() 
 The following expression formats the SellStartDate 
value as MMM-YY. 
=FORMAT(Fields!SellStartDate.Value, "MMM-yy") (OR) 
=FORMAT(Fields!SellStartDate.Value, dd/MM/yyyy“)
• The following example displays the start date of the 
current year. 
=DateAdd(DateInterval.Year,DateDiff(DateInterval.Year,C 
Date("01/01/1900"),Now()),CDate("01/01/1900")) 
 The following expressions display various dates based 
on a date parameter value selected by the user.
 Yesterday 
=DateSerial(Year(Parameters!TodaysDate.Value),Month(Parameters! 
TodaysDate.Value),Day(Parameters!TodaysDate.Value)-1) 
 Two Days Ago 
=DateSerial(Year(Parameters!TodaysDate.Value),Month(Parameters! 
TodaysDate.Value),Day(Parameters!TodaysDate.Value)-2)
 One Month Ago 
=DateSerial(Year(Parameters!TodaysDate.Value),Month(Parameters! 
TodaysDate.Value)-2,Day(Parameters!TodaysDate.Value)) 
 One Year Ago 
 =DateSerial(Year(Parameters!TodaysDate.Value)1,Month(Parameters! 
TodaysDate.Value),Day(Parameters!TodaysDate.Value)) 
 Two Years Ago 
=DateSerial(Year(Parameters!TodaysDate.Value)-2,Month(Parameters! 
TodaysDate.Value),Day(Parameters!TodaysDate.Value))
 Trimming DOMAINusername to just the user name 
=Right(Parameters!User.Value, Len(Parameters!User.Value) - 
InStr(Parameters!User.Value, "")) 
 Display the selected values from a multivalue parameter 
= Join(Parameters!MySelection.Value) (OR) 
=”Report for “ & JOIN(Parameters!MySelection.Value, “ & “)
 To combine the two string values in the text boxes. 
=Fields!FirstName.Value & vbCrLf & Fields! 
LastName.Value 
 The following expression displays values of the 
StartDate and EndDate parameters in long date 
format: 
=Format(Parameters!StartDate.Value, "D") & " through " 
& Format(Parameters!EndDate.Value, "D")
 To change the format of a ten-digit telephone number in a field 
from "nnn-nnn-nnnn" to "(nnn) nnn-nnnn": 
=System.Text.RegularExpressions.Regex.Replace(Fields!Phone.Value, 
"(d{3})[ -.]*(d{3})[ -.]*(d{4})", "($1) $2-$3") 
 The lookup function,The following expression displays the product 
name from a dataset (“Product”), given the product identifier to 
match on 
=Lookup(Fields!PID.Value, Fields!ProductID.Value, 
Fields.ProductName.Value, "Product")
 converts the constant 500 to type Decimal in order to compare it to 
a Transact-SQL money data type 
=CDec(500) 
 The following expression displays the number of values selected for 
the multivalue parameter MySelection. 
=CStr(Parameters!MySelection.Count) 
 Use multiple IIF functions can be placed in the fill color of a text box 
to change the background color depending on the value in the text 
box.
=IIF(Fields!PctComplete.Value >= 10, "Green", IIF(Fields!PctComplete.Value 
>= 1, "Blue", "Red")) (OR) 
=swithc(Fields!PctComplete.Value >= 10, "Green",Fields!PctComplete.Value 
>= 1,yellow,Fields!PctComplete.Value >= 15,Oranage, "True", "Red") 
 Test the value of the ImportantDate field and return "Red" if it is more 
than a week old, and "Blue" otherwise. It used to control the Color 
property of a text box in a report item 
=IIF(DateDiff("d",Fields!ImportantDate.Value, Now())>7,"Red","Blue")
 Test the value of the Department field and return 
either a subreport name or a null This expression can 
be used for conditional drillthrough subreports. 
=IIF(Fields!Department.Value = "Development", 
"EmployeeReport", Nothing) 
 To displayed only if the value of the field is not null. 
=IIF(IsNothing(Fields!LargePhoto.Value),True,False)
 To displays NA in the Month field when the field contains the value of 0 
=IIF(Fields!Month.Value=0,"NA",MonthName(IIF(Fields! 
Month.Value=0,1,Fields!Month.Value))) 
 This function can be useful in the header or footer of a group. The 
following expression displays the sum of data in the Order group or data 
region 
 =Sum(Fields!LineTotal.Value, "Order") 
 =Sum(IIF(Fields!State.Value = "Finished", 1, 0))
 changes the color of the text depending on the value of the Profit 
field 
=Iif(Fields!Profit.Value < 0, "Red", "Black") 
 To display alternates the background color of each row between 
pale green and white 
=Iif(RowNumber(Nothing) Mod 2, "PaleGreen", "White") 
 Using an expression for a specified scope, you may have to indicate 
the dataset for the aggregate function
=Iif(RowNumber("Employees") Mod 2, "PaleGreen", 
"White") 
 shows the table only if it has more than 12 rows 
=IIF(CountRows()>12,false,true) 
 To check the if the field exists in the report dataset 
after the data is retrieved from the data source 
=IIF(Fields!Column_1.IsMissing, true, false)
 Lookup To combine the two dataset columns in the single report 
item. 
=Lookup(Fields!SiteCode.Value,Fields!SiteCode.Value,Fields! 
DistributionPoint.Value, "DataSet2") 
 Lookupset 
Join(LookupSet(Fields!PID.Value , 
, Fields!Xtrnl_Award_Type.Value & " - " & Fields! 
Xtrnl_Award_Date.Value 
, "Awards"), ", ")
 Multi Lookup 
=Join(MultiLookup(Split(Fields! 
CategoryList.Value,","), Fields! 
CategoryID.Value 
,Fields!CategoryName.Value,"Category")), ", ")

More Related Content

What's hot

SAMSTAR: A Semi-automated Lexical Method to generate Star Schemas from an ERD
SAMSTAR: A Semi-automated Lexical Method to generate Star Schemas from an ERDSAMSTAR: A Semi-automated Lexical Method to generate Star Schemas from an ERD
SAMSTAR: A Semi-automated Lexical Method to generate Star Schemas from an ERDThe Children's Hospital of Philadelphia
 
Bis 155 Exceptional Education / snaptutorial.com
Bis 155 Exceptional Education / snaptutorial.comBis 155 Exceptional Education / snaptutorial.com
Bis 155 Exceptional Education / snaptutorial.com
Davis142
 
Excel tutorial
Excel tutorialExcel tutorial
Excel tutorial
SayeedAsghar
 
Devry bis-155-final-exam-guide-new
Devry bis-155-final-exam-guide-newDevry bis-155-final-exam-guide-new
Devry bis-155-final-exam-guide-new
shyaminfo104
 
5 creating a_histogram
5 creating a_histogram5 creating a_histogram
5 creating a_histogramMedia4math
 
2018 03 27_biological_databases_part4_v_upload
2018 03 27_biological_databases_part4_v_upload2018 03 27_biological_databases_part4_v_upload
2018 03 27_biological_databases_part4_v_upload
Prof. Wim Van Criekinge
 
Scoda openrefine-directordata
Scoda openrefine-directordataScoda openrefine-directordata
Scoda openrefine-directordataTony Hirst
 
Dervy bis-155-final-exam-guide-music-on-demand-new
Dervy bis-155-final-exam-guide-music-on-demand-newDervy bis-155-final-exam-guide-music-on-demand-new
Dervy bis-155-final-exam-guide-music-on-demand-new
individual484
 
GPREC DBMS Notes 1
GPREC DBMS Notes 1GPREC DBMS Notes 1
GPREC DBMS Notes 1
Sreedhar Chowdam
 
4)lab activity2 ms access
4)lab activity2 ms access4)lab activity2 ms access
4)lab activity2 ms accesspanks172
 
BIS 155 Lessons in Excellence / bis155.com
BIS 155 Lessons in Excellence / bis155.comBIS 155 Lessons in Excellence / bis155.com
BIS 155 Lessons in Excellence / bis155.com
kopiko33
 
BIS 155 Inspiring Innovation -- bis155.com
BIS 155 Inspiring Innovation -- bis155.comBIS 155 Inspiring Innovation -- bis155.com
BIS 155 Inspiring Innovation -- bis155.com
kopiko101
 
Devry bis 155 final exam guide (music on demand) new
Devry bis 155 final exam guide (music on demand) newDevry bis 155 final exam guide (music on demand) new
Devry bis 155 final exam guide (music on demand) new
uopassignment
 
BIS 155 Expect Success/newtonhelp.com
BIS 155 Expect Success/newtonhelp.comBIS 155 Expect Success/newtonhelp.com
BIS 155 Expect Success/newtonhelp.com
myblue26
 

What's hot (16)

SAMSTAR: A Semi-automated Lexical Method to generate Star Schemas from an ERD
SAMSTAR: A Semi-automated Lexical Method to generate Star Schemas from an ERDSAMSTAR: A Semi-automated Lexical Method to generate Star Schemas from an ERD
SAMSTAR: A Semi-automated Lexical Method to generate Star Schemas from an ERD
 
Bis 155 Exceptional Education / snaptutorial.com
Bis 155 Exceptional Education / snaptutorial.comBis 155 Exceptional Education / snaptutorial.com
Bis 155 Exceptional Education / snaptutorial.com
 
Excel tutorial
Excel tutorialExcel tutorial
Excel tutorial
 
Devry bis-155-final-exam-guide-new
Devry bis-155-final-exam-guide-newDevry bis-155-final-exam-guide-new
Devry bis-155-final-exam-guide-new
 
5 creating a_histogram
5 creating a_histogram5 creating a_histogram
5 creating a_histogram
 
2018 03 27_biological_databases_part4_v_upload
2018 03 27_biological_databases_part4_v_upload2018 03 27_biological_databases_part4_v_upload
2018 03 27_biological_databases_part4_v_upload
 
Scoda openrefine-directordata
Scoda openrefine-directordataScoda openrefine-directordata
Scoda openrefine-directordata
 
Dervy bis-155-final-exam-guide-music-on-demand-new
Dervy bis-155-final-exam-guide-music-on-demand-newDervy bis-155-final-exam-guide-music-on-demand-new
Dervy bis-155-final-exam-guide-music-on-demand-new
 
GPREC DBMS Notes 1
GPREC DBMS Notes 1GPREC DBMS Notes 1
GPREC DBMS Notes 1
 
Histogram
HistogramHistogram
Histogram
 
4)lab activity2 ms access
4)lab activity2 ms access4)lab activity2 ms access
4)lab activity2 ms access
 
BIS 155 Lessons in Excellence / bis155.com
BIS 155 Lessons in Excellence / bis155.comBIS 155 Lessons in Excellence / bis155.com
BIS 155 Lessons in Excellence / bis155.com
 
BIS 155 Inspiring Innovation -- bis155.com
BIS 155 Inspiring Innovation -- bis155.comBIS 155 Inspiring Innovation -- bis155.com
BIS 155 Inspiring Innovation -- bis155.com
 
Devry bis 155 final exam guide (music on demand) new
Devry bis 155 final exam guide (music on demand) newDevry bis 155 final exam guide (music on demand) new
Devry bis 155 final exam guide (music on demand) new
 
Thesis PPT
Thesis PPTThesis PPT
Thesis PPT
 
BIS 155 Expect Success/newtonhelp.com
BIS 155 Expect Success/newtonhelp.comBIS 155 Expect Success/newtonhelp.com
BIS 155 Expect Success/newtonhelp.com
 

Similar to Ssrs expressions

Introduction to DAX Language
Introduction to DAX LanguageIntroduction to DAX Language
Introduction to DAX Language
Antonios Chatzipavlis
 
Stata cheatsheet transformation
Stata cheatsheet transformationStata cheatsheet transformation
Stata cheatsheet transformation
Laura Hughes
 
A "M"ind Bending Experience. Power Query for Power BI and Beyond.
A "M"ind Bending Experience. Power Query for Power BI and Beyond.A "M"ind Bending Experience. Power Query for Power BI and Beyond.
A "M"ind Bending Experience. Power Query for Power BI and Beyond.
Alex Powers
 
Chris Seebacher Portfolio
Chris Seebacher PortfolioChris Seebacher Portfolio
Chris Seebacher Portfolio
guest3ea163
 
Stata Cheat Sheets (all)
Stata Cheat Sheets (all)Stata Cheat Sheets (all)
Stata Cheat Sheets (all)
Laura Hughes
 
Stata cheat sheet: data transformation
Stata  cheat sheet: data transformationStata  cheat sheet: data transformation
Stata cheat sheet: data transformation
Tim Essam
 
Cheat Sheet for Stata v15.00 PDF Complete
Cheat Sheet for Stata v15.00 PDF CompleteCheat Sheet for Stata v15.00 PDF Complete
Cheat Sheet for Stata v15.00 PDF Complete
TsamaraLuthfia1
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence PortfolioChris Seebacher
 
unit 1 ppt.pptx
unit 1 ppt.pptxunit 1 ppt.pptx
unit 1 ppt.pptx
VillainMass
 
A "M"ind Bending Experience. Power Query for Power BI and Beyond.
A "M"ind Bending Experience. Power Query for Power BI and Beyond.A "M"ind Bending Experience. Power Query for Power BI and Beyond.
A "M"ind Bending Experience. Power Query for Power BI and Beyond.
Alex Powers
 
1.2 Zep Excel.pptx
1.2 Zep Excel.pptx1.2 Zep Excel.pptx
1.2 Zep Excel.pptx
PizzaM
 
Sql saturday 829_decalogo_powerbi
Sql saturday 829_decalogo_powerbiSql saturday 829_decalogo_powerbi
Sql saturday 829_decalogo_powerbi
Lorenzo Vercellati
 
A picture speaks a thousand words - Data Visualisation with R
A picture speaks a thousand words - Data Visualisation with RA picture speaks a thousand words - Data Visualisation with R
A picture speaks a thousand words - Data Visualisation with R
Barbara Fusinska
 
Baby-step tutorial on adding Dynamism in Chats (Ms Excel)
Baby-step tutorial on adding Dynamism in Chats (Ms Excel)Baby-step tutorial on adding Dynamism in Chats (Ms Excel)
Baby-step tutorial on adding Dynamism in Chats (Ms Excel)
Amit Panasara
 
Simple Spreadsheet Tips
Simple Spreadsheet TipsSimple Spreadsheet Tips
Simple Spreadsheet Tips
Inside Access
 
on SQL Managment studio(For the following exercise, use the Week 5.pdf
on SQL Managment studio(For the following exercise, use the Week 5.pdfon SQL Managment studio(For the following exercise, use the Week 5.pdf
on SQL Managment studio(For the following exercise, use the Week 5.pdf
formaxekochi
 
Stata cheat sheet: data processing
Stata cheat sheet: data processingStata cheat sheet: data processing
Stata cheat sheet: data processing
Tim Essam
 
Chapter 16-spreadsheet1 questions and answer
Chapter 16-spreadsheet1  questions and answerChapter 16-spreadsheet1  questions and answer
Chapter 16-spreadsheet1 questions and answer
RaajTech
 
Intro to tsql unit 10
Intro to tsql   unit 10Intro to tsql   unit 10
Intro to tsql unit 10Syed Asrarali
 
Basic Analysis using Python
Basic Analysis using PythonBasic Analysis using Python
Basic Analysis using Python
Sankhya_Analytics
 

Similar to Ssrs expressions (20)

Introduction to DAX Language
Introduction to DAX LanguageIntroduction to DAX Language
Introduction to DAX Language
 
Stata cheatsheet transformation
Stata cheatsheet transformationStata cheatsheet transformation
Stata cheatsheet transformation
 
A "M"ind Bending Experience. Power Query for Power BI and Beyond.
A "M"ind Bending Experience. Power Query for Power BI and Beyond.A "M"ind Bending Experience. Power Query for Power BI and Beyond.
A "M"ind Bending Experience. Power Query for Power BI and Beyond.
 
Chris Seebacher Portfolio
Chris Seebacher PortfolioChris Seebacher Portfolio
Chris Seebacher Portfolio
 
Stata Cheat Sheets (all)
Stata Cheat Sheets (all)Stata Cheat Sheets (all)
Stata Cheat Sheets (all)
 
Stata cheat sheet: data transformation
Stata  cheat sheet: data transformationStata  cheat sheet: data transformation
Stata cheat sheet: data transformation
 
Cheat Sheet for Stata v15.00 PDF Complete
Cheat Sheet for Stata v15.00 PDF CompleteCheat Sheet for Stata v15.00 PDF Complete
Cheat Sheet for Stata v15.00 PDF Complete
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolio
 
unit 1 ppt.pptx
unit 1 ppt.pptxunit 1 ppt.pptx
unit 1 ppt.pptx
 
A "M"ind Bending Experience. Power Query for Power BI and Beyond.
A "M"ind Bending Experience. Power Query for Power BI and Beyond.A "M"ind Bending Experience. Power Query for Power BI and Beyond.
A "M"ind Bending Experience. Power Query for Power BI and Beyond.
 
1.2 Zep Excel.pptx
1.2 Zep Excel.pptx1.2 Zep Excel.pptx
1.2 Zep Excel.pptx
 
Sql saturday 829_decalogo_powerbi
Sql saturday 829_decalogo_powerbiSql saturday 829_decalogo_powerbi
Sql saturday 829_decalogo_powerbi
 
A picture speaks a thousand words - Data Visualisation with R
A picture speaks a thousand words - Data Visualisation with RA picture speaks a thousand words - Data Visualisation with R
A picture speaks a thousand words - Data Visualisation with R
 
Baby-step tutorial on adding Dynamism in Chats (Ms Excel)
Baby-step tutorial on adding Dynamism in Chats (Ms Excel)Baby-step tutorial on adding Dynamism in Chats (Ms Excel)
Baby-step tutorial on adding Dynamism in Chats (Ms Excel)
 
Simple Spreadsheet Tips
Simple Spreadsheet TipsSimple Spreadsheet Tips
Simple Spreadsheet Tips
 
on SQL Managment studio(For the following exercise, use the Week 5.pdf
on SQL Managment studio(For the following exercise, use the Week 5.pdfon SQL Managment studio(For the following exercise, use the Week 5.pdf
on SQL Managment studio(For the following exercise, use the Week 5.pdf
 
Stata cheat sheet: data processing
Stata cheat sheet: data processingStata cheat sheet: data processing
Stata cheat sheet: data processing
 
Chapter 16-spreadsheet1 questions and answer
Chapter 16-spreadsheet1  questions and answerChapter 16-spreadsheet1  questions and answer
Chapter 16-spreadsheet1 questions and answer
 
Intro to tsql unit 10
Intro to tsql   unit 10Intro to tsql   unit 10
Intro to tsql unit 10
 
Basic Analysis using Python
Basic Analysis using PythonBasic Analysis using Python
Basic Analysis using Python
 

Recently uploaded

Borys Sutkowski portfolio interior design
Borys Sutkowski portfolio interior designBorys Sutkowski portfolio interior design
Borys Sutkowski portfolio interior design
boryssutkowski
 
一比一原版(毕业证)长崎大学毕业证成绩单如何办理
一比一原版(毕业证)长崎大学毕业证成绩单如何办理一比一原版(毕业证)长崎大学毕业证成绩单如何办理
一比一原版(毕业证)长崎大学毕业证成绩单如何办理
taqyed
 
RTUYUIJKLDSADAGHBDJNKSMAL,D
RTUYUIJKLDSADAGHBDJNKSMAL,DRTUYUIJKLDSADAGHBDJNKSMAL,D
RTUYUIJKLDSADAGHBDJNKSMAL,D
cy0krjxt
 
PDF SubmissionDigital Marketing Institute in Noida
PDF SubmissionDigital Marketing Institute in NoidaPDF SubmissionDigital Marketing Institute in Noida
PDF SubmissionDigital Marketing Institute in Noida
PoojaSaini954651
 
一比一原版(BU毕业证)波士顿大学毕业证如何办理
一比一原版(BU毕业证)波士顿大学毕业证如何办理一比一原版(BU毕业证)波士顿大学毕业证如何办理
一比一原版(BU毕业证)波士顿大学毕业证如何办理
peuce
 
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
pmgdscunsri
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE TRELLO
LORRAINE ANDREI_LEQUIGAN_HOW TO USE TRELLOLORRAINE ANDREI_LEQUIGAN_HOW TO USE TRELLO
LORRAINE ANDREI_LEQUIGAN_HOW TO USE TRELLO
lorraineandreiamcidl
 
一比一原版(MMU毕业证书)曼彻斯特城市大学毕业证成绩单如何办理
一比一原版(MMU毕业证书)曼彻斯特城市大学毕业证成绩单如何办理一比一原版(MMU毕业证书)曼彻斯特城市大学毕业证成绩单如何办理
一比一原版(MMU毕业证书)曼彻斯特城市大学毕业证成绩单如何办理
7sd8fier
 
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
7sd8fier
 
20 slides of research movie and artists .pdf
20 slides of research movie and artists .pdf20 slides of research movie and artists .pdf
20 slides of research movie and artists .pdf
ameli25062005
 
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
Mansi Shah
 
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
9a93xvy
 
Portfolio.pdf
Portfolio.pdfPortfolio.pdf
Portfolio.pdf
garcese
 
Book Formatting: Quality Control Checks for Designers
Book Formatting: Quality Control Checks for DesignersBook Formatting: Quality Control Checks for Designers
Book Formatting: Quality Control Checks for Designers
Confidence Ago
 
Research 20 slides Amelia gavryliuks.pdf
Research 20 slides Amelia gavryliuks.pdfResearch 20 slides Amelia gavryliuks.pdf
Research 20 slides Amelia gavryliuks.pdf
ameli25062005
 
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
9a93xvy
 
Expert Accessory Dwelling Unit (ADU) Drafting Services
Expert Accessory Dwelling Unit (ADU) Drafting ServicesExpert Accessory Dwelling Unit (ADU) Drafting Services
Expert Accessory Dwelling Unit (ADU) Drafting Services
ResDraft
 
vernacular architecture in response to climate.pdf
vernacular architecture in response to climate.pdfvernacular architecture in response to climate.pdf
vernacular architecture in response to climate.pdf
PrabhjeetSingh219035
 
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
h7j5io0
 
projectreportnew-170307082323 nnnnnn(1).pdf
projectreportnew-170307082323 nnnnnn(1).pdfprojectreportnew-170307082323 nnnnnn(1).pdf
projectreportnew-170307082323 nnnnnn(1).pdf
farazahmadas6
 

Recently uploaded (20)

Borys Sutkowski portfolio interior design
Borys Sutkowski portfolio interior designBorys Sutkowski portfolio interior design
Borys Sutkowski portfolio interior design
 
一比一原版(毕业证)长崎大学毕业证成绩单如何办理
一比一原版(毕业证)长崎大学毕业证成绩单如何办理一比一原版(毕业证)长崎大学毕业证成绩单如何办理
一比一原版(毕业证)长崎大学毕业证成绩单如何办理
 
RTUYUIJKLDSADAGHBDJNKSMAL,D
RTUYUIJKLDSADAGHBDJNKSMAL,DRTUYUIJKLDSADAGHBDJNKSMAL,D
RTUYUIJKLDSADAGHBDJNKSMAL,D
 
PDF SubmissionDigital Marketing Institute in Noida
PDF SubmissionDigital Marketing Institute in NoidaPDF SubmissionDigital Marketing Institute in Noida
PDF SubmissionDigital Marketing Institute in Noida
 
一比一原版(BU毕业证)波士顿大学毕业证如何办理
一比一原版(BU毕业证)波士顿大学毕业证如何办理一比一原版(BU毕业证)波士顿大学毕业证如何办理
一比一原版(BU毕业证)波士顿大学毕业证如何办理
 
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE TRELLO
LORRAINE ANDREI_LEQUIGAN_HOW TO USE TRELLOLORRAINE ANDREI_LEQUIGAN_HOW TO USE TRELLO
LORRAINE ANDREI_LEQUIGAN_HOW TO USE TRELLO
 
一比一原版(MMU毕业证书)曼彻斯特城市大学毕业证成绩单如何办理
一比一原版(MMU毕业证书)曼彻斯特城市大学毕业证成绩单如何办理一比一原版(MMU毕业证书)曼彻斯特城市大学毕业证成绩单如何办理
一比一原版(MMU毕业证书)曼彻斯特城市大学毕业证成绩单如何办理
 
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
 
20 slides of research movie and artists .pdf
20 slides of research movie and artists .pdf20 slides of research movie and artists .pdf
20 slides of research movie and artists .pdf
 
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
 
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
 
Portfolio.pdf
Portfolio.pdfPortfolio.pdf
Portfolio.pdf
 
Book Formatting: Quality Control Checks for Designers
Book Formatting: Quality Control Checks for DesignersBook Formatting: Quality Control Checks for Designers
Book Formatting: Quality Control Checks for Designers
 
Research 20 slides Amelia gavryliuks.pdf
Research 20 slides Amelia gavryliuks.pdfResearch 20 slides Amelia gavryliuks.pdf
Research 20 slides Amelia gavryliuks.pdf
 
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
 
Expert Accessory Dwelling Unit (ADU) Drafting Services
Expert Accessory Dwelling Unit (ADU) Drafting ServicesExpert Accessory Dwelling Unit (ADU) Drafting Services
Expert Accessory Dwelling Unit (ADU) Drafting Services
 
vernacular architecture in response to climate.pdf
vernacular architecture in response to climate.pdfvernacular architecture in response to climate.pdf
vernacular architecture in response to climate.pdf
 
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
 
projectreportnew-170307082323 nnnnnn(1).pdf
projectreportnew-170307082323 nnnnnn(1).pdfprojectreportnew-170307082323 nnnnnn(1).pdf
projectreportnew-170307082323 nnnnnn(1).pdf
 

Ssrs expressions

  • 2.  To display the current data and Time =Now()  The following expression formats the SellStartDate value as MMM-YY. =FORMAT(Fields!SellStartDate.Value, "MMM-yy") (OR) =FORMAT(Fields!SellStartDate.Value, dd/MM/yyyy“)
  • 3. • The following example displays the start date of the current year. =DateAdd(DateInterval.Year,DateDiff(DateInterval.Year,C Date("01/01/1900"),Now()),CDate("01/01/1900"))  The following expressions display various dates based on a date parameter value selected by the user.
  • 4.  Yesterday =DateSerial(Year(Parameters!TodaysDate.Value),Month(Parameters! TodaysDate.Value),Day(Parameters!TodaysDate.Value)-1)  Two Days Ago =DateSerial(Year(Parameters!TodaysDate.Value),Month(Parameters! TodaysDate.Value),Day(Parameters!TodaysDate.Value)-2)
  • 5.  One Month Ago =DateSerial(Year(Parameters!TodaysDate.Value),Month(Parameters! TodaysDate.Value)-2,Day(Parameters!TodaysDate.Value))  One Year Ago  =DateSerial(Year(Parameters!TodaysDate.Value)1,Month(Parameters! TodaysDate.Value),Day(Parameters!TodaysDate.Value))  Two Years Ago =DateSerial(Year(Parameters!TodaysDate.Value)-2,Month(Parameters! TodaysDate.Value),Day(Parameters!TodaysDate.Value))
  • 6.  Trimming DOMAINusername to just the user name =Right(Parameters!User.Value, Len(Parameters!User.Value) - InStr(Parameters!User.Value, ""))  Display the selected values from a multivalue parameter = Join(Parameters!MySelection.Value) (OR) =”Report for “ & JOIN(Parameters!MySelection.Value, “ & “)
  • 7.  To combine the two string values in the text boxes. =Fields!FirstName.Value & vbCrLf & Fields! LastName.Value  The following expression displays values of the StartDate and EndDate parameters in long date format: =Format(Parameters!StartDate.Value, "D") & " through " & Format(Parameters!EndDate.Value, "D")
  • 8.  To change the format of a ten-digit telephone number in a field from "nnn-nnn-nnnn" to "(nnn) nnn-nnnn": =System.Text.RegularExpressions.Regex.Replace(Fields!Phone.Value, "(d{3})[ -.]*(d{3})[ -.]*(d{4})", "($1) $2-$3")  The lookup function,The following expression displays the product name from a dataset (“Product”), given the product identifier to match on =Lookup(Fields!PID.Value, Fields!ProductID.Value, Fields.ProductName.Value, "Product")
  • 9.  converts the constant 500 to type Decimal in order to compare it to a Transact-SQL money data type =CDec(500)  The following expression displays the number of values selected for the multivalue parameter MySelection. =CStr(Parameters!MySelection.Count)  Use multiple IIF functions can be placed in the fill color of a text box to change the background color depending on the value in the text box.
  • 10. =IIF(Fields!PctComplete.Value >= 10, "Green", IIF(Fields!PctComplete.Value >= 1, "Blue", "Red")) (OR) =swithc(Fields!PctComplete.Value >= 10, "Green",Fields!PctComplete.Value >= 1,yellow,Fields!PctComplete.Value >= 15,Oranage, "True", "Red")  Test the value of the ImportantDate field and return "Red" if it is more than a week old, and "Blue" otherwise. It used to control the Color property of a text box in a report item =IIF(DateDiff("d",Fields!ImportantDate.Value, Now())>7,"Red","Blue")
  • 11.  Test the value of the Department field and return either a subreport name or a null This expression can be used for conditional drillthrough subreports. =IIF(Fields!Department.Value = "Development", "EmployeeReport", Nothing)  To displayed only if the value of the field is not null. =IIF(IsNothing(Fields!LargePhoto.Value),True,False)
  • 12.  To displays NA in the Month field when the field contains the value of 0 =IIF(Fields!Month.Value=0,"NA",MonthName(IIF(Fields! Month.Value=0,1,Fields!Month.Value)))  This function can be useful in the header or footer of a group. The following expression displays the sum of data in the Order group or data region  =Sum(Fields!LineTotal.Value, "Order")  =Sum(IIF(Fields!State.Value = "Finished", 1, 0))
  • 13.  changes the color of the text depending on the value of the Profit field =Iif(Fields!Profit.Value < 0, "Red", "Black")  To display alternates the background color of each row between pale green and white =Iif(RowNumber(Nothing) Mod 2, "PaleGreen", "White")  Using an expression for a specified scope, you may have to indicate the dataset for the aggregate function
  • 14. =Iif(RowNumber("Employees") Mod 2, "PaleGreen", "White")  shows the table only if it has more than 12 rows =IIF(CountRows()>12,false,true)  To check the if the field exists in the report dataset after the data is retrieved from the data source =IIF(Fields!Column_1.IsMissing, true, false)
  • 15.  Lookup To combine the two dataset columns in the single report item. =Lookup(Fields!SiteCode.Value,Fields!SiteCode.Value,Fields! DistributionPoint.Value, "DataSet2")  Lookupset Join(LookupSet(Fields!PID.Value , , Fields!Xtrnl_Award_Type.Value & " - " & Fields! Xtrnl_Award_Date.Value , "Awards"), ", ")
  • 16.  Multi Lookup =Join(MultiLookup(Split(Fields! CategoryList.Value,","), Fields! CategoryID.Value ,Fields!CategoryName.Value,"Category")), ", ")