Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report Hell!
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Miscellaneous
Thread ID:
00519730
Message ID:
00519803
Views:
26
This message has been marked as a message which has helped to the initial question of the thread.
Hi Nadya,

My understanding was that you wanted to reprint the last detail line in the group summary. You can expand the idea and prevent the last record from printing in the detail band by specifying the "print only when expression is true" property for each object in the detail band. If you didn't have groups, you could probably use "recno() # reccount()" as the expression. Since you have groups, you'll probably need to add a logical field (to indicate the last record of the group and preprocess the table.

ie
Add a logical field called lgri (last group record indicator) to the cursor

lcGroup = groupfield
SCAN
  IF groupfield # lcGroup OR RECNO() = RECC()
    REPLACE lgri WITH .T.
    lcGroup = groupfield
  ENDIF
ENDSCAN
Your "print only when expression is true" expression becomes !lgri

Obviously, this is all a huge pain in the rear, but I think it's probably the only way to prevent orphans in VFP. Note that you can play with the layout of the group footer "detail" objects so that for non-orphan groups, it prints in exactly the same place as the real detail would.

I hope this makes sense :)

>>Nadya,
>>
>>If I understand your question correctly, I think you can solve this using report variables. Create one variable for each field in the report detail. Set the "value to store" property of each report variable to the associated field. Copy the objects from the detail band into the group summary band and change each object's expression to the associated report variable.
>
>Hi Brien,
>
>I did not understand your suggestion. My problem is, that I have an orphan group summary without at least one detail record. I was trying to achieve the desired result using "print group on the next page when less than" option, but unsuccessfully. Group summary is wider, than detail, it cotains two records, while detail - only one. If I copy all fields from detail to group summary, how would I control to not print last group record in detail, but print it in summary (if I understand your idea)?
>
>Thanks in advance.
>
>
>>>Hi everybody,
>>>
>>>I have a report, which has two groups and looks like this:
>>>
>>>Page Header
>>>Some info
>>>---------------
>>>Group1 - nothing
>>>----------------
>>>Group2 - Group header
>>>-----------------------
>>>detail - 1 line
>>>------------------
>>>Group1 - Footer - two lines
>>>----------------------------
>>>Group2 - Footer - nothing
>>>--------------------------------
>>>Page footer - some info
>>>
>>>Now, I have a situation, when I have 3 pages with the data and Group summary goes to the 4th page. I tried lots of different values in Start Group on the new page if less than, and I either 48 pages, when the last page has only summary info, or I have ~2000 pages.
>>>
>>>How can I make this report to print Group summary + one record from the previous page?
>>>
>>>Thanks in advance.
Brien R. Givens

Brampwood Systems
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform