0

I am attempting to create a parameter which looks at the values of a field in the report which is calculated based on the entry of another parameter.

Specifically, the first parameter is a number option (30,60 or 90) and the field expression is a DATEADD that adds the parameter value to the value of a date field.

The next parameter I need is to pick dates in the "expression field" that fall into a certain range. i.e. user chooses 30 so the report generates and populates the "Hire Date" + 30.

I want to then only select the records where that new date falls into a specified range i.e. Effective Date 2/1/2020-2/29/2020. I have been looking everywhere, but cannot find an answer and I don't know if it is possible.

Results example

[EffDate Field[\]\[1\]][1]

Results example

Filburt
  • 17,626
  • 12
  • 64
  • 115
MeganBBK
  • 11
  • 1
  • 2

2 Answers2

1

I think this was what SuperSimmer 44 was referring to that I couldn't understand before.

I added the following parameters:

Wait - which is an integer & has set available values of 30, 60 & 90 From - Date To - Date

I kept the field "Effective Date" in my report which was the expression =DateAdd("d",Parameters!wait.Value,Fields!HireDate.Value)

I then added a filter to the Dataset that said if the value of the expression =DateAdd("d",Parameters!wait.Value,Fields!HireDate.Value) was between @from & @to then they should include the record in the results. It worked perfectly. Report Sample

MeganBBK
  • 11
  • 1
  • 2
0

Insert 2 parameters, one called qty to hold available values from a list 30/60/90 or 120 etc

the other called date to hold your from effective date.

Set up a calculated field in your dataset called effectivedate that utilised DateAdd, for example ie: =DateAdd("d",Parameters!qty.Value,Parameters!effectivedate.Value)

Then set a filter on your dataset that utilizes this calculated field.

SuperSimmer 44
  • 964
  • 2
  • 7
  • 12
  • Thank you, however I think maybe I didn't explain properly. The purpose of the report is to identify employees who will have completed their wait period. That wait period depends on the company (i.e. 30,60,90) and I do not currently have a field in any table that says what the wait period is for each company. So the end user has to enter the wait period and then the effective date (end of wait period) s calculated by adding those days (30,60 or 90) to the hire date field. That p[art works. I was able to create the exp and it calculated the date. The 2nd part is to then filter to pull only – MeganBBK Jan 29 '20 at 21:49
  • --employees who's "effective date' falls within a specified range (again, entered by the end user) so isn't something I can hard code. – MeganBBK Jan 29 '20 at 21:54
  • could your report be for an individual company? do you know the wait period for each company? – SuperSimmer 44 Jan 30 '20 at 00:46
  • It couldn't, however I was thinking about your response and I'm not sure this is what you were referring to, but it worked. I kept the field "Effective Date" with the expression that referenced the Hire Date + the selected wait period parameter. Then I added in a filter option in the DataSet which says to filter if the expression results fall into the range for the other parameters 'From" & "To". This is working. I will try to upload a screenshot. Stack wasn't allowing me to earlier. – MeganBBK Jan 30 '20 at 20:25