ThisWindow.Reset GPF

I have a window that contains a browse that is populated by a table in MSSQL.
The window contains a button to Print a Report using the same table in MSSQL
The Report prints correctly, but when control is returned back to the Window I get a Access Violation error when the code executes ThisWindow.Reset. I am using the latest version of Clarion 10.

Code snipit
! End of “Control Event Handling”
OF ?btnPrint
! [Priority 8500]

I have tried things like FLUSH(BRW4.View) and BRW4.ResetFromView() but it still crashes.

Any suggestions are welcomed.

Maybe try posting an event, then try your reset there?

Think you’ll find this may well be an issue with the use of decimal values in the report query procedure in the report. If you’re using decimals and particularly if using sum or other mathematical operators on the decimal returned value be sure to cast it as a decimal otherwise a gpf will result.

The report does nothing other than print data from the SQL Table.
If I spawn the report on a separate thread, the report prints correctly and the window does not crash.

Are you using Print Preview? We had similar issue, until changed Preview to PDF output.

Thanks, when turn off the Print Preview the Window does not crash.

I wonder if this is a C10 bug?

I also had a problem, as you describe. Never knew to try and switch off print preview. I do suspect a bug. Think I got around the issue by building a queue and making it a queue based report.