creating a function with date parameters

i want to create a function to find

presence of certain type of leaves value with in some dates(start and end) which are my parameters[P_ST_DT,P_EN_DT]

and then sum of those days,,

my problem is that the inserting dates (start and end), they will not be apart of the tables they will be

any dates could be inserted, its giving me that  [P_ST_DT,P_EN_DT] are not declared??

how can i fix those parameters??!  

February 2nd, 2014 6:07am

Hi Nadia_Azam,

If I understand correctly, you have add a date parameter in your report. You want use the parameter to filter data which is between start date and end date. If we want the parameter values is table data, we need to configure Available Values of the parameter. After we created a parameter, we can need to add filter of the tablix or dataset to filter data.

Suppose we have a dataset (DataSet1) with following fields: DateTime, Detail. Please refer to the following steps:

  1. Create another dataset (DataSet2) with DateTime field.
  2. Add a parameter (P_ST_DT) in the report. Click Available Values in the left pane in the Report Parameter Properties dialog box.
  3. Select Get values from a query, and filled with values below:
    Dataset: DataSet2
    Value field: DateTime
    Label field: DateTime
  4. Use the same method configure parameter P_EN_DT
  5. Double click the DataSet1 in the Report Data dialog box.
  6. Click Filters in the left pane. Click Add icon filled with following values:
    Expression: [ DateTime]
    Operator: Between
    Value: [@P_ST_DT]    [@P_EN_DT]

There is an article about Report Parameters, you can refer to it.
http://msdn.microsoft.com/en-us/library/dd220464.aspx

If there are any misunderstanding, please elaborate the issue for further investigation.

Regards,
Alisa Tang

Free Windows Admin Tool Kit Click here and download it now
February 3rd, 2014 1:41am

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

Other recent topics Other recent topics