How to get Min & Max for Date ?
Hello,
Mighrating a crystal report, i need help with this expression
Minimum(CreateDate). How would i convert that into an ssrs expression?
Thank you
FM
April 12th, 2011 4:43pm
Min and Max functions can be used.Remember to mark as an answer if this post has helped you.
Free Windows Admin Tool Kit Click here and download it now
April 12th, 2011 4:50pm
That's not even applicable in SSRS. CR has a date range parameter type that allows the developer to create a single range prompt that will prompt the end user for both begin and end dates in the one prompt. Both values are stored internally, by CR, as an array.
If you want to reference the parameter value on the reports design surface you need to specify which of the two values you want...
Minimum({?DateRangeParameter}) or Maximum({?DateRangeParameter})
SSRS doesn't have this type of data parameter available. The SSRS data/time parameter only holds a single value, so if you want to specify the beginning and end of a date range you need to use 2 separate parameters. eg: @BeginDate & @EndDate.
So... to get the equivalent, of Minimum({?DateRangeParameter}) you'd use =Parameters!BeginDate.Value and for
Maximum({?DateRangeParameter}) you'd use =Parameters!EndDate.Value
Hope that makes sense...
Jason Long
April 12th, 2011 5:25pm
I jason i found a min(fields!datein.value) option in the expression editor so i used it .FM
Free Windows Admin Tool Kit Click here and download it now
April 12th, 2011 5:26pm
Check the CR report formula.
If it reads like this...
Minimum({TableName.CreateDate})
or like this...
Minimum({@CreateDate})
Then the formula is referencing a table field or a formula field and you'd be correct. The Min function in SSRS is the same as the Minimum function in CR.
... but, if it reads like this...
Minimum({?CreateDate})
It's referencing a date range parameter, like I described above.
Jason Long
April 12th, 2011 5:34pm