Report &= Report1 - C6 Clarion Templates

I have a C6 Clarion template application in which I want to use the “People.App” technique of assigning the Report definition another report definition. i.e.

Report &= Report1

This is working well, the report generates and previews perfectly, but…the application hangs when I return to the calling procedure. It just shows a wait cursor.

Since this is a Clarion template application is there something extra I need to do when the report is finished with?

Report &= ''
CLOSE(Report)

Seems to have fixed it?

The delay could be about the deleting of the wmf files. Test if Close(Report) is SLOW on your System? – Mine 100x slower than C6

I’m guessing you have some un-deleted temp files as a result of that :slight_smile:

Thanks Jeff, I don’t understand why deleting temp files would cause it to hang? (It’s a 1 page report) Do you think it might be trying to delete non-existent temp files?

I don’t know why report &= ‘’ would fix it either, if it has?

But I haven’t investigated what’s in the temp folder, yet.

Sorry, Geoff - Didn’t notice the C6 part.

But I suspect the &= ‘’ is not an actual fix.

Is your actual report generated by the templates?

It could it be possible that the report is already closed by the template.

What does STATUS(Report) show, before dereferencing? status_return_file_status_.htm [Clarion Community Help]

1 Like

Thanks Jeff, The original “report” is template generated and the CLOSE(Report) is template generated.

Setting Report &= ‘’ before, or after, the CLOSE(Report) prevents the procedure from hanging.

What is the scope of the declaration of your &REPORT reference variable? Is it in the same place as the actual report (e.g. within the report PROCEDURE) or is it global or other?

I’ve seen occurrences where a global reference assigned to a non-global “thing” went wonky when the non-global “thing” no longer existed.

Are you sure the hang is within the report PROCEDURE, or could it be after the procedure exited, leaving your global &REPORT pointing to a no-longer-valid piece of memory?

Just grasping at straws :slight_smile:

Yeah, thanks again Jeff, all input is valuable since I’m in the dark :grin:

I’m basically doing what David Bayliss does in the supplied People.app, except that is done using ABC templates and I’m stuck with Clarion templates. I was actually surprised it worked at all, but it is!

All the reports are declared in the local data area, I’ve now got 3 additional reports declared straight after the original which is designed within the template designer.

I’ve not observed any bad behaviour after assigning Report &- ‘’, and yes, it is hanging in the report procedure without that line of code.

And the &REPORT is where?