0

I have a SSRS Report where in the Header i have inserted an expression to make the reports title dynamic, like this report title Now i want to achieve the result that when i select invoice start date as 1st January 2018 and END Date as 1st January 2018, means one day Data i want in the title NOT to Display like ‘01 Jan 2018 and 01 Jan 2018’ means a date range, i just want '1 jan 2018' and when i select 2 different date then i want a Date range in the title.

Can anyone help me to achieve my result ?

aduguid
  • 3,099
  • 6
  • 18
  • 37
deep
  • 41
  • 1
  • 12
  • Hi, go to your title text 'expression' and put a condition such as =IIF start date is equal to end date then title only displays start date .... May I see your expression for your dynamic title please .... Cheers – Ali Jan 23 '18 at 09:44
  • Hi Yeah sure in first expression i am just getting the value of parameter account number which have been selected to run the report like this `=Parameters!Account_no.Value(0) ` and then i am just picking the value from invoice start date and end date selected to run the report like this `=Parameters!Invoice_Date_Start.Value` same for end date – deep Jan 23 '18 at 09:57
  • If i understand correctly , are you looking for something like this ? `=IIF(Parameters!Invoice_Date_Start.Value = Parameters!Invoice_Date_End.Value), "Start and end date is the same", "Start and end date is different"` - to insert date you can use the following `=IIF(Parameters!Invoice_Date_Start.Value = Parameters!Invoice_Date_End.Value), Parameters!Invoice_Date_Start.Value, Parameters!Invoice_Date_End.Value + " to " Parameters!Invoice_Date_End.Value` (Check the syntex please) – Ali Jan 23 '18 at 10:16
  • Hi Yes i am exactly looking for this thank you very much. got it what i want :) – deep Jan 23 '18 at 10:21
  • no problem :) glad it helped – Ali Jan 23 '18 at 11:01

1 Answers1

0

=IIF(Parameters!Invoice_Date_Start.Value = Parameters!Invoice_Date_End.Value), "Start and end date is the same", "Start and end date is different"

To insert the date you can use the following =IIF(Parameters!Invoice_Date_Start.Value = Parameters!Invoice_Date_End.Value), Parameters!Invoice_Date_Start.Value, Parameters!Invoice_Date_End.Value + " to " Parameters!Invoice_Date_End.Value

(Check the syntax please)

Ali
  • 2,702
  • 3
  • 32
  • 54