Subject Re: REPORT Risfaction.ENDER
From Mustansir Ghor <mustan31@hotmail.com>
Date Sun, 16 Jul 2017 15:00:13 -0400
Newsgroups dbase.getting-started

Dear Mervyn Sir

Thank you. The explanations gives more than satisfaction. It really helps to understand the subject.

There is one more subject that I am finding still difficult to understand. Menu working with _app.framewindow and return to IDE at the test of application. I will re work on it and perhaps take assistance from you when I am stuck.

Once again thank you.

Best Regards
Mustansir

Mervyn Bick Wrote:

> On 2017-07-16 11:16 AM, Mustansir Ghor wrote:
> > Dear All
> >
> > I refer to report file. When we enter "set procedure to MyFishReport.rep" in the command line, then the procedure has intial below code but does not execute so does it mean it only loads that report class into memory. For that matter for any procedure.
> >
> > With do statement it actually runs the procedure. I guess so we can define r object properties within report.rep file.
> >
> >
> > ** END HEADER -- do not remove this line
> > // Generated on 16-07-17
> > //
> > local r
> > r = new MYFISHREPORTREPORT()
> > r.render()
> >
> > class MYFISHREPORTREPORT of REPORT
> >
> > Best Regards
> > Mustansir
> >
>
>
> If you just want to run the report from the command line or from within
> a program (or form) then
>
>     do myfishreport.rep
>
> The dBASE DO command will run any .prg, .wfm or .rep file.  With a .prg
> file you can omit the .prg but you need to include the .wfm or .rep for
> forms and windows.
>
> You only need set procedure to.... if you want to open an instance of
> the report in memory.  Normally this is done by the 'bootstrap' code at
> the top of the sourcecode before the class definition.  If, however, you
> want to, say, alter some text on the report before it is rendered then
>
>     set procedure to myfishreport.rep
>
> This loads the sourcecode into memory. At this stage it is just sourcecode.
>
>     r = new myfishreportreport()
>
> This creates an instance of the report in memory.  The designer uses r
> as a variable name to hold the instance of the form name but you can use
> anything you like.  In a form, for instance you might have
>
>     form.oRep = new myfishreportreport()
>
> Now that there is an actual instance of the report in memory you can
> change the properties of any object to whatever you want to
>
>     r.pagetemplate1.text1.text = 'A new heading'
>
>     r.render() (or form.oRep.render() ) will run the report with the new
> text on the pagetemplate.
>
>
> It may help to think of the class definition in the sourcecode as being
> like the architect's plan for a house.  Creating an instance of the
> report by using the NEW command is like building a house from the plan.
> Once the house is built you can change, say, the glass in teh windows
> from plain glass to frosted glass.
>
> Mervyn.
>
>
>
>
>
>
>
>
>