Date parameter default to today
Hi I'm using SQL Server 2008 R2 SP1. When I set the default value for a date parameter to =Now or =Now() the control becomes disabled. How do I set a date parameter to default to the current date? Thanks http://www.contentrendering.com http://www.smolite.com http://www.objecttranspose.com http://cloudfilesupload.codeplex.com/
August 1st, 2012 7:41pm

Hi, It is probably because you have a non default parameter before thee date parameter you are having issues with. See this http://stackoverflow.com/questions/2541456/ssrs-date-default-with-formula-disables-parameter After playing some more, I realized that the date controls became enabled when I picked a value from a preceding dropdown parameter that did not have a default. Apparently, controls after non-default parameters are disabled until you pick something, so order matters. From an MDSN article: http://msdn.microsoft.com/en-us/library/cc281392.aspx "parameter order is important when you want to show users the default value for one parameter before they choose values for other parameters" Shahfaisal Muhammed http://shahfaisalmuhammed.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
August 1st, 2012 8:59pm

To set default values for parameters In Design view, in the Report Data pane, expand Parameters, and double-click your date parameter. The Report Parameter Properties dialog box opens. Click Default Values. Select the Specify values option. The Add button and an empty Value grid appears. Click Add. An empty row is added to the grid. Click in the Value text box and delete the default text (Null) Click the fx box. Select the date/time option and Now(). Click OK.
August 1st, 2012 9:31pm

Thanks Shahfaisal for your help. That resolved the problem http://www.contentrendering.com http://www.smolite.com http://www.objecttranspose.com http://cloudfilesupload.codeplex.com/
Free Windows Admin Tool Kit Click here and download it now
August 3rd, 2012 12:33am

Thanks Shahfaisal for your help. That resolved the problem http://www.contentrendering.com http://www.smolite.com http://www.objecttranspose.com http://cloudfilesupload.codeplex.com/
August 3rd, 2012 12:33am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics