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 Best regards
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?
Take a look at TD help for SalReportView -- the second parameter is a handle to
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:"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."
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.Set lv_HWndRet = SalReportView( hWndForm, hWndNULL, 'test.qrp', lv_sVariable, lv_sInput, lv_nErrFlags )
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.
Palm Springs, California
Who is online
Users browsing this forum: [Ccbot] and 2 guests