Solved Report displays for a second the goes on background.

General discussion forum about all things Team Developer 6.x
gigit
Italy
Posts: 21
Joined: 14 Jun 2017, 15:04
Location: Italy

Report displays for a second the goes on background.

Post by gigit » 03 Jul 2017, 10:00

Hi to all.
With 6.0 sp8 I have this problem. I use

On SAM_ReportFetchNext
If not SalTblFindNextRow( tblBolli, nRow,0,0 )
Return FALSE
Call SalTblSetFocusRow( tblBolli, nRow )
Return TRUE

to scan a child table and print each row.
In
Set hWndHandle= SalReportView( tblBolli, hWndNULL, sReport, sVariables, sInput, nErr )

the preview window has shown only for a bit, then it goes on background and the control returns to the last row of the scanned table.
With older versions this doesn't happen. Is it a known bug? Do you have some hint to solve?
Many Thanks.
Gigit

Uwe van der Horst
Site Admin
Site Admin
Germany
Posts: 62
Joined: 05 Mar 2017, 14:21
Location: Wetter (Ruhr), Germany

Re: Report displays for a second the goes on background.

Post by Uwe van der Horst » 03 Jul 2017, 10:55

Hi Gigit,

is there a reason why the report doesn't have an owner?

I guess that passing hWndForm or hWndMDI as second parameter would solve this problem.

Set hWndHandle= SalReportView( tblBolli, hWndForm, sReport, sVariables, sInput, nErr )
Best regards,
Uwe van der Horst
Advo-web GmbH

gigit
Italy
Posts: 21
Joined: 14 Jun 2017, 15:04
Location: Italy

Re: Report displays for a second the goes on background.

Post by gigit » 03 Jul 2017, 12:39

Hi, Uwe.
The reason is that there is no reason to have it. :D
Usually hWndNULL is the default window to display the preview, and I use a different window only if I have different needs.
With older versions there is no problem with hWndNULL. I will build a new window ant try.
Thank you.
You do not have the required permissions to view the files attached to this post.

gigit
Italy
Posts: 21
Joined: 14 Jun 2017, 15:04
Location: Italy

Re: Report displays for a second the goes on background.

Post by gigit » 03 Jul 2017, 13:04

Solved with this.

!!CB!! 139
Set hWndHandle = SalCreateWindow( frmPreview, hWndForm )
Call SalReportView( tblBolli, hWndHandle, sReport, sVariabili, sInput, nErr )


I create an empty form then I use this window that handles the preview instead of the default window.
A dirty trick for a little bug.

Return to “General Discussion”

Who is online

Users browsing this forum: Ccbot [Crawler] and 0 guests