Scheduler, Printing to Archives, Should not generate report when NoData
Hello,
I've written a scheduler that runs, depending on settings of the reports
some reports daily, weekly or monthly based. That part works fine, but what
i would like to achieve is that, when the report find no data (ex, de data
isn't complete yet for the past week, some in not yet uploaded) the report
doesn't print, or doesn't create the Archive file.
More, i would like to sense from my Delphi program that the report didn't
print, so that the report reschedules on a later moment.
All reports are RAP/DADE reports and are also being served over a Report
Server. This scheduler doesn't run the reports over the server, there is a
local ppReport component. The scheduler itself run on the same machine as
the report server.
The main goal is that some users will only get archived reports and will not
be 'free' to make reports with their own selections. We have over 100
regular users, and e special service that run's ah-hoc reports.
Any Suggestions
I've written a scheduler that runs, depending on settings of the reports
some reports daily, weekly or monthly based. That part works fine, but what
i would like to achieve is that, when the report find no data (ex, de data
isn't complete yet for the past week, some in not yet uploaded) the report
doesn't print, or doesn't create the Archive file.
More, i would like to sense from my Delphi program that the report didn't
print, so that the report reschedules on a later moment.
All reports are RAP/DADE reports and are also being served over a Report
Server. This scheduler doesn't run the reports over the server, there is a
local ppReport component. The scheduler itself run on the same machine as
the report server.
The main goal is that some users will only get archived reports and will not
be 'free' to make reports with their own selections. We have over 100
regular users, and e special service that run's ah-hoc reports.
Any Suggestions
This discussion has been closed.
Comments
technique, please let me know
// Set Output Device
ppReport.DeviceType := dtArchive;
ppReport.NoDataBehaviors := [ndBlankPage];
ppReport.ShowAutoSearchDialog := False;
ppReport.ShowPrintDialog := False;
RepLocation := CheckDir(RepName, CompName,
intToStr(xYear));
ppReport.ArchiveFileName := RepLocation + 'Week_' + FormatFloat('00',
Int(xWeek)) + '.Raf';
// Print The Report
ppReport.Print;
// Check if Printed
if ppReport.AbsolutePageCount = 0 then
begin
if FileExists(ppReport.ArchiveFileName) then
DeleteFile(ppReport.ArchiveFileName);
end
else
CodeSite.SendString('Report', ppReport.ArchiveFileName);
It's a difficult question to answer, especially if some of the data could be
there but not all of it. The problem sounds like more of a busiess-rules one
then a report-generator one. Does that make sense?
Ed Dressel
Team DM