Skip to Content
0

Records Select Expert - Maximum Date

Dec 27, 2016 at 10:38 PM

37

avatar image

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?

Thanks.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Vitaly Izmaylov
Dec 28, 2016 at 07:04 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded