SalReportView: SAM_ReportFinish is not fired

Discussion forum about all things Report Builder (all versions).
EwaldP
Austria
Posts: 351
Joined: 07 Mar 2017, 08:00
Location: Austria

SalReportView: SAM_ReportFinish is not fired

Post by EwaldP » 20 Jul 2016, 16:00

Hi,

in TD applications before 6.3, SAM_ReportFinish is fired if the user close the preview created by SalReportView. Could you confirm that this is a bug?

Win7 64bit
Testcase Print NoReportFinish.apt - [Testcase Print N.png
Testcase Print NoReportFinish.zip
Best regards
Ewald
You do not have the required permissions to view the files attached to this post.
Ewald P. Palmetshofer
EDV-Hausleitner GmbH
4020 Linz
www.edv-hausleitner.at

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

Re: SalReportView: SAM_ReportFinish is not fired

Post by EwaldP » 22 Aug 2016, 08:39

No reaction?
Ewald P. Palmetshofer
EDV-Hausleitner GmbH
4020 Linz
www.edv-hausleitner.at

Mike Vandine

Re: SalReportView: SAM_ReportFinish is not fired

Post by Mike Vandine » 03 Oct 2016, 06:36

Hi Ewald,

I don't get a messagebox about the report finishing whether I close the preview or actually print this.

Can you tell me if this has worked with *any* 6.3 version or is the 6.3 base version where the problem started occurring? Do you know if this worked with TD6.2?

Thanks!

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

Re: SalReportView: SAM_ReportFinish is not fired

Post by EwaldP » 11 Oct 2016, 15:11

Hi Mike,
sorry for the late reply. Same behaviour in TD 6.3 Build 44741 (I think this is the first 6.3 version).

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

Jeff Luther
Site Admin
Site Admin
United States of America
Posts: 2370
Joined: 04 Mar 2017, 18:34
Location: Palm Springs, California

Re: SalReportView: SAM_ReportFinish is not fired

Post by Jeff Luther » 11 Oct 2016, 17:10

Ewald:

Take a look at TD help for SalReportView -- the second parameter is a handle to
"An optional window handle (or name) to a custom report template. If null, Report Builder creates its own window in which it displays the report."
In your test, the second parameter is hWndForm, which is not a 'custom report template;' rather, it's a handle to the window processing the SAM_Report msgs. I think the solution in your coding is to pass this as param. 2 = hWndNULL:
Set lv_HWndRet = SalReportView( hWndForm, hWndNULL, 'test.qrp', lv_sVariable, lv_sInput, lv_nErrFlags )
It looks like the RB runtime is trying to use your hWndForm handle (passed as param. 2) as the custom report template. Since it seems RB does not consider that as an valid custom template window (likely because hWndForm is already the handle for the SAM_Report msgs), RB runtime defaults to its own internal report template. Thus, SAM_ReportFInish is being sent to its own template window which isn't processing the msg.

I've always and only seen hWndNULL as param. 2 to the SalReportView call (assuming the code does not have a custom report template). If you change your test case to pass that NULL hWnd, then your form window receives the 'Finish' msg. OK.
Jeff Luther @ PC Design
Palm Springs, California

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

Re: SalReportView: SAM_ReportFinish is not fired

Post by EwaldP » 14 Oct 2016, 12:36

Hi Jeff,

thanks for your effort to clear this, nevertheless TD reacts in different ways up to 6.1 and 6.3.

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

Mike Vandine

Re: SalReportView: SAM_ReportFinish is not fired

Post by Mike Vandine » 28 Oct 2016, 05:26

Hi Ewald,

This works with TD6.1 SP5, but not with TD6.2 and above.

Do you want me to log a defect for this? Can you live without this message? :) If it's critical, I can log a defect.

Best regards,

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

Re: SalReportView: SAM_ReportFinish is not fired

Post by EwaldP » 03 Nov 2016, 16:04

Hi Mike,

thank you for the answer. No, I built a workaround for me. It's ok. I think it is important that the different behaviour is documented for other programmers.
Ewald P. Palmetshofer
EDV-Hausleitner GmbH
4020 Linz
www.edv-hausleitner.at

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 2 guests