Solved SalReportPrint() in a very special situation makes troubles

Discussion forum about all things Report Builder (all versions).
Johann
Austria
Posts: 369
Joined: 30 Mar 2017, 09:58
Location: Vienna

SalReportPrint() in a very special situation makes troubles

Post by Johann » 01 Dec 2016, 11:23

Hello,

we need to run an external program out of an update trigger with xp_cmdshell on a sql server express. This prog makes some selects in sql server and collects the necessary data to print them out with SalReportPrint() function.

The trigger works, and in order not to disturb the sql server (beacuse the trigger waits till the prog returns control), we have written a little prog RunAsync.exe which is called by the trigger and starts our printing prog. While the printing prog makes its work, the RunAsync.exe ended and returns the control to the trigger.

So now to the problem, this works on my notebook properly (there is TD 6.3 SP4 installed) but not on the customer PC where only the TD deploy is installed.
Same OS Win 8.1, same TD, same DB settings

My logs tell me, all the selects are done properly, but the SalReportPrint() hangs. If I try to print into a PDF file the file is created but wit 0 length. I would assume there is an visible object in play which is suppressed from the xp_cmdshell and therefore the print function hangs.

FYI I create a SalCreateWindowEx(, , , HIDDEN) which handles the Report printing messages.

Has sombody an idea?

Any hint is very appreciated

Best regards
Johann

EwaldP
Austria
Posts: 351
Joined: 07 Mar 2017, 08:00
Location: Austria

Re: SalReportPrint() in a very special situation makes troubles

Post by EwaldP » 13 Dec 2016, 09:13

Hi Johann,

do you have tried to create the window not hidden? In the past I had already problems with the execution of (report) messages if the window is hidden.

Best regards
Ewald
Ewald P. Palmetshofer
EDV-Hausleitner GmbH
4020 Linz
www.edv-hausleitner.at

Johann
Austria
Posts: 369
Joined: 30 Mar 2017, 09:58
Location: Vienna

Re: SalReportPrint() in a very special situation makes troubles

Post by Johann » 13 Dec 2016, 12:44

Problem Solved,

it had to do with access rights.

Regards
Johann

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 2 guests