I have creatred 2 reports using the DataEnvironment and DataReports. My problem is I call the printing of the reports one right after the other. When I am using the printer connected to my machine, they are fine, but when using a network printer, the first report does not print. When I step through the code, it prints, but not when run with no stops.
Should there be a delay between the reports? Why does the first one get skipped? Any ideas and suggestions for a fix would be great.
Here is a little detail on what I am doing.
I have one connection in the DataEnvironment(cnnReports),2 SQL Commands (ComHourly, ComSalary)
Both of these Select all from the needed query (Access 2000 DB). 2 reports, one with datamember comHourly and other with comSalary.
I format the data I need by opening the recordsets via code EX:
SQL$ = SQL$ & "VAL(RegHrs) * .01 AS RegHrs,"
SQL$ = SQL$ & "RecType,DeleteRec FROM HoursQuery WHERE "
SQL$ = SQL$ & "RecType='05' AND DeleteRec <>'D' "
SQL$ = SQL$ & "ORDER BY Name ASC"
DtaReports.rscomHourlyRpt.Open SQL$
RptHourly.Orientation = rptOrientLandscape
RptHourly.PrintReport
do the same thing for the second report.
THanks in advance for any help
Catrina
Should there be a delay between the reports? Why does the first one get skipped? Any ideas and suggestions for a fix would be great.
Here is a little detail on what I am doing.
I have one connection in the DataEnvironment(cnnReports),2 SQL Commands (ComHourly, ComSalary)
Both of these Select all from the needed query (Access 2000 DB). 2 reports, one with datamember comHourly and other with comSalary.
I format the data I need by opening the recordsets via code EX:
SQL$ = SQL$ & "VAL(RegHrs) * .01 AS RegHrs,"
SQL$ = SQL$ & "RecType,DeleteRec FROM HoursQuery WHERE "
SQL$ = SQL$ & "RecType='05' AND DeleteRec <>'D' "
SQL$ = SQL$ & "ORDER BY Name ASC"
DtaReports.rscomHourlyRpt.Open SQL$
RptHourly.Orientation = rptOrientLandscape
RptHourly.PrintReport
do the same thing for the second report.
THanks in advance for any help
Catrina