Subject |
Re: REPORT GROUPING ON FIELDS |
From |
Mervyn Bick <invalid@invalid.invalid> |
Date |
Fri, 23 Jun 2017 14:37:31 +0200 |
Newsgroups |
dbase.getting-started |
On 2017-06-23 10:38 AM, Mustansir Ghor wrote:
> Dear Mervyn
>
> Your assistance is a great help. Thank you.
>
> There is some confusion with me to understand below code. Here "this" refers for classname whose base class is REPORT. then can you explain what this statement means "form.STREAMFRAME1 = form.pagetemplate1.streamframe1". Also same with last 4 statements. I mean what does "form" represent.
>
>
> this.PAGETEMPLATE1.STREAMFRAME1 = new STREAMFRAME(this.PAGETEMPLATE1)
> with (this.PAGETEMPLATE1.STREAMFRAME1)
> height = 11592.0
> left = 360.0
> top = 1365.0
> width = 9360.0
> form.STREAMFRAME1 = form.pagetemplate1.streamframe1
> endwith
>
> with (this.reportGroup.footerBand)
> height = 250.0
> endwith
>
> with (this.reportGroup.headerBand)
> height = 250.0
> endwith
>
> this.firstPageTemplate = this.form.pagetemplate1
> this.form.pagetemplate1.nextPageTemplate = this.form.pagetemplate1
> this.form.pagetemplate1.streamframe1.streamSource = this.form.streamsource1
> this.form.streamsource1.rowset = this.form.customers1.rowset
>
In the constructor code that you show 'this' refers to the form i.e the
report.
in the last 4 lines both 'this' and 'this.form' refer to the report
itself. I have no idea as to why the programmer who created the report
engine opted for this, to my mind, peculiar naming. The code is
streamed out by the designer and it works even if it does look
confusing. :-)
You can try the following for yourself. Before the last 4 lines add
? this.classname,this.form.classname
Comment out the 4 lines
// this.firstPageTemplate = this.form.pagetemplate1
// this.form.pagetemplate1.nextPageTemplate = this.form.pagetemplate1
// this.form.pagetemplate1.streamframe1.streamSource =
this.form.streamsource1
// this.form.streamsource1.rowset = this.form.customers1.rowset
Add the following
// form.firstPageTemplate = this.form.pagetemplate1
// form.pagetemplate1.nextPageTemplate = form.pagetemplate1
// form.pagetemplate1.streamframe1.streamSource = form.streamsource1
// form.streamsource1.rowset = form.customers1.rowset
this.firstPageTemplate = this.form.pagetemplate1
this.pagetemplate1.nextPageTemplate = this.pagetemplate1
this.pagetemplate1.streamframe1.streamSource = this.streamsource1
this.streamsource1.rowset = this.customers1.rowset
Unmark the top block, mark the second block and run the report again.
The report should behave exactly the same no matter which of the 3
blocks you use.
Mervyn.
|
|