Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Keep Group Together Including Footer on a Columnar Report

Status
Not open for further replies.

ChubbyArse

Programmer
May 20, 2003
13
GB
Hi All,

I have my page split into 3 columns to display my information.
I've also a group with a header and footer. I've set the group to 'Keep Group Together', and also ensured that the checkboxes are set in the section expert.

The problem I have is that the group is not being kept together on the coloumn break, and the footer of the last group of the first column is at the top of the second column.

I've experimented with all the options with regard to the groups, and the layout tab of the detail section to no avail.

Has anybody else encountered this problem and been able to sort it?

Thanks
 
Apologies,

I'm using Crystal 9, and the reports are displayed using a vb.net front-end.

Thanks

Alex
 
There are a couple of methods, but try this one. First make sure your details and group sections are of the same height, and that each page displays the same sections. You can check the size by going to edit->object size/position for each field. Make sure the fields are all the same height and that the Y value is 0. Then move the section boundary so that it is minimized. Next create a running total {#cntwingrp} using the expert. Choose a recurring field, let's call it {table.ID}, count, evaluate on each record, reset on change of group.

Also create two formulas:

//{@resetline} to be placed in the page header:
whileprintingrecords;
numbervar linecnt := 0;

//{@linecnt} for the detail section AND in the group header section:
whileprintingrecords;
numbervar linecnt := linecnt + 1;

Note the resulting number at the bottom of the page before you format for multiple columns. make sure this number is the same on every page. Note the number and use it in the formula below instead of "60".

Next create a formula that uses one of the fields you plan to display in your column--again, let's assume that it is {table.ID}:

if count({table.ID},{table.groupfield}) <= 60 and
count({table.ID},{table.groupfield}) = {#cntwingrp} then
(totext({table.ID},0,"") +
replicatestring(chr(13),60-count({table.ID},{table.groupfield}))) else

if count({table.ID},{table.groupfield}) > 60 and
count({table.ID},{table.groupfield}) = {#cntwingrp} and
remainder(count({table.ID},{table.groupfield}),60) <> 0 then
(totext({table.ID},0,"") +
replicatestring(chr(13),60-remainder(count({table.ID},{table.groupfield}),60))) else

totext({table.ID},0,"")

Place this on the report canvas and make sure to format it to "can grow" (format field->common->check "can grow".

Now format with multiple columns->set the width and gap->down then across->check format groups with multiple columns.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top