Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics SL forum
Unanswered

Auto PDF Printing from a Scheduled Task.

Posted on by Microsoft Employee

Afternoon all,

I am running into a problem with auto printing PDFs from Dynamics SL.  The application I have written runs as expected when executed normally ( double clicked ), PDFs are printed, everything is great.  When I attempt to run the app from a scheduled task, ROI.exe is erroring out with a FileNotFoundException.    Below is my code for the starting of the process ( C# ).  The location that I am printing to is a network location... what I can't figure out for the life of me is why it would run perfectly fine one way, and not the other.

//Save the PDF
Process myProcess = new Process();
myProcess.StartInfo.UseShellExecute = true;
myProcess.StartInfo.FileName = slDir + "ROI.exe";
myProcess.StartInfo.Arguments = "0 "
+ report.r.report.Trim() + "/run "
+ report.r.report.Trim() + "/format "
+ report.r.whereclause.Trim() + "/where "
+ "0/expformat "
+ @report.r.exportdirectory.Trim() + "Test\\" + pdfFileName + "/expfilename";

myProcess.StartInfo.CreateNoWindow = false;
myProcess.Start();

  • Apps Mexico Profile Picture
    Apps Mexico 1,090 on at
    RE: Auto PDF Printing from a Scheduled Task.

    Hi,

    Did you try do the same thing but with a vbtools screen, using the SL SDK?

    You can use the vbtools functions to call the ROI.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,570 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,683 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans