`
ABC: Window not open error on empty reports 1998-08-26 -- Jeremy Soronen Newsgroups: topspeed.products.c4 This should fasinate all of you. A friend and I found the problem causing the window not open error. If you create a report that has a page counter on it, and none of your records meet the filter criteria, the procedure will end with a 'window not open' error. First a window stating no records to process appears, followed by the window not open error msg. This is caused because of this: ThisWindow.OpenReport PROCEDURE() ReturnValue BYTE,AUTO CODE ReturnValue = PARENT.OpenReport() IF ~ReturnValue SELF.Report$?ReportDateStamp{PROP:Text}=FORMAT(TODAY(),@d02b) END report$?ReportPageNumber{PROP:PageNo}=True RETURN ReturnValue If you notice, the Report Date Stamp checks if there was a fatal error, but the page number tries to print regardless. Since there is no report to print on, the result is the window not open error. The window being the report itself. The way I have worked around this is to make my own page counter in the procedure and not use the template. This is until Clarion fixes the template problem. Any questions or comments can be sent to vejita@provide.net. Please do not hesitate. I do wish to see this problem fixed and any comments are welcome. Jeremy Soronen Printed November 21, 2024, 6:59 am This article has been viewed/printed 35394 times. Google search has resulted in 31 hits on this article since January 25, 2004. |