on 2019 Nov 22 12:23 PM
Hello All:
In my Crystal Report, on refresh I would like to use a formula to capture the last DataDate value and pass it to my selection criteria. I tried the very simple
BeforeReadingRecords; DataDate
but DataDate apparently updates as soon as one clicks the Refresh button. So, my formula is capturing the DataDate value before reading records, but the DataDate field has at that point already updated to the current date. Is there any way I can force my formula to read the DataDate value when I click refresh, but before Crystal reads the current date?
Thanks,
Patrick
Unfortunately, there is no way to do this using DataDate.
How are you running the report? If you're using the SDK in an application, you could add functionality that would set a "last run date" in the database (new table to track this...) This is also possible if you were to use a stored procedure to get the data for your report. The logic would be:
1. Get the last run date for the report.
2. Use that date to filter the data for the report in the "Where" clause of the query.
3. Update the last run date in the database.
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
8 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.