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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datareport won’t print from a Scheduled Task

Status
Not open for further replies.

wooddsw

IS-IT--Management
Oct 7, 2003
27
US
I have a VB 6.0 SP6 application that processes order files. It is setup to run either unattended as a scheduled task with a command line parameter or via a form interface. The appl generates a report at the end of the run via a Datareport designer.

Now the bug…

When I run the appl via the form interface (or from within the VB source environment to debug) it processes normally and generates the report.

When I run the appl via a scheduled task on my machine it processes the data but doesn’t print the report. The scheduled tasks are created using my own network credentials (which are in the domain admins group by the way) as the RunAs parameters. Nothing appears in errors.log that is typically created in the installation directory when there’s a problem. I also have had the printer queue opened and don’t see anything passing through.

I’m wondering if anyone has experienced this and identified a work around. I’m thinking it’s a part of the XP Scheduled Task process but I have full control rights to my own machine.

 
Obvious thing to point out:
drDataReport.Show
vs.
drDataReport.PrintReport

Are you using the .PrintReport method in your code, and
not .Show?


Outside of a dog, a book is man's best friend. Inside of a dog it's too dark to read.
 
I am using PrintReport. I did just this morning resolve it. Rather I should say stumbled on it. It appears it was the RunAs credentials as I suspected. I tried several different logons and then when back to my own logon and it started working. It worked only once so far so I'm going to monitor it this week.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top