Showing results for 
Search instead for 
Did you mean: 

Records Select Expert - Maximum Date

0 Kudos

I have a report where I use a parameter to select a reporting period (which is a field in our database). Example: Jan 2016 (a string field)

I want to automate this report, so it will automatically use the "latest reporting period" without entering any parameters.

There is another field I can use called "First Date of Reporting Period". (datetime field)

I tried a maximum formula using the "First Date of Reporting Period" in the Select Expert, but this does not seem to be allowed.

Any suggestions?


Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Maximum is a Summary - it means CR should review all records to find a Maximum, so it could not be used in Records Selection.

One of the options is to pass the logic to your database using command object or stored procedure. It could be done the following way:

1. Main report connects to a Command object that brings the maximum value for the field

2. Your original report could be added as a subreport to the main report and the Max value passed from the Main report to Subreport Records Selection formula