Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Viewing Previously Scheduled Instances Shows Nil Records? 1

Status
Not open for further replies.

Sange

Technical User
Jun 10, 2002
85
AU
Hi,

I have developed a report in CR10 which is scheduled to run monthly via CE10.

The report has two columns; one which shows the results for the previous month and the other column shows a year to date total.

The report appears to run without an problems and returns the correct data at the start of each month but I've now gone back and viewed earlier scheduled instances of this report and it's not returning records in the previous month column.

This appears to be happening in reports where I'm calculating whether a record was created in the previous month.

I always thought that the scheduled instance was a snap shot of the data at the time the report ran. Therefore, viewing this instance at a later time should still show the same results as the time it originally ran.

Am I correct?
 
Yes and No - the data is a SNAPSHOT at the time the report ran, but some calculations are recalculated when the RPT-Viewer opens the RPT instance.

For example - the formula that you are using for the previous-month calculation may be using CURRENT DATE in the calculation. Using CURRENT DATE means that the RPT-Viewer recalculates the formula on every view based on the date you are VIEWING the RPT.

If you used the DATA DATE in the formula then the previous-month will be based on the day the RPT instance was RUN against the database. This value will never change when you are VIEWING the RPT.

Another option is to run the instances directly to PDF from the SCHEDULE. This is true WYSIWYG (it's never going to change at view-time), but you lose some of the features of the RPT-Viewer in CE-10.
 
Thanks for clarifying this for me, I suspect currentdate is being used in some of the scheduled reports which certainly explains the problem.

I actually have two more questions relating to this:

1. I am also using currentdate in the select statement ie.

date(table.date) <= dateserial(Year(currentdate), Month(currentdate, 1-1)

Would this also recalculate each time the scheduled instance is viewed?

2. I am also using the following formula in the actual report:

If table.date in lastfullmonth then 1 else 0.

I'm then using a sum to count all the records equal to 1. Could this also be a problem if viewing a scheduled instance at a later date?


Sorry about all the questions but I'm trying to eliminate all possibilities.

Thanks.
 
I don't think #1 should be a problem - because you never go back to the database on a VIEW only on a REFRESH.

#2 would probably be an issue, you would be best to use a formula based on DATA DATE - 1 month.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top