Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Maintaining Group Header Information
Message
From
31/10/1997 23:14:06
 
 
To
31/10/1997 20:44:53
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00057704
Message ID:
00057745
Views:
22
>>The Report Designer is not object orientated. So, you can't use objects in it.
>>
>>Vlad
>>
>>>I've created a report with a child and a parent that
>>>has a relation and a skip set prior to the run of the
>>>report. The totals located in the group footer section
>>>is sometimes forced to the next page because of the number
>>>of child records on the first page. Unfortunately the
>>>information in the group header on this 2nd page is
>>>incorrect showing the following records information. I
>>>have many different solutions, including tying a custom
>>>object to the report that will display this group header
>>>information. Nothing seems to be working.
>>>
>>>Dan
>
>* here's the code
>oRpt = CREATEOBJECT("RPTFUNCS")
>REPORT FORM TO PRINT
>
>* in the report one of the fields for a dealer number
>* the expression is oRpt.mpGetDlrNmbr()
>* this procedure may be as simple as
>
>RETURN this.pcDlrNmbr
>
>* Now I've made this work for a custom numbering system
>* running down the side of a series of transactions.
>* but this what I'm trying to do here is much more
>* complicated. When do I set the property ( oRpt.SetDlrNmbr )
>* so that it will display properly on the following page.
>
>Dan

Sure you are right. You can use properties and methods of already existing objects as you can use variables and functions/procedures.

I thought you want to define your own group header class and plug it into a report as you would do for a form.

The problem is that you can't modify a property of an object directly from a report (but you can call a method or a function to do it.) Basically, the only solid way to do it (AFAIK) is to define a variable in the report, put a constant as Value to Store and call a function/method (which will modify the printed property) for Initial Value. The variable must be reset at the correct group level. After that, the property will have the correct value to be printed. This works because variables are reset (at the specified level) before the band prints. All variables are recalculated (the Value to Store) before the print of the detail band. The variables are calculated/reset in the order they are defined (ie the order they appear in the list in the Report Variables dialog).

Vlad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform