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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I had column breaks working, did something to break it... 1

Status
Not open for further replies.

xcmuchip

Programmer
May 31, 2001
70
0
0
I have a multiple column report using Crystal 8.5. I had it working a couple weeks ago, I came back to the report for modifications and found that my column breaks are not working.

The forced column breaks work until the last column which forces a page break. So it looks like I have "New Page after" selected for my group footer, but I don't.

I have removed all "New page" check marks to try to figure out my problem. It seems that everything works until I check the "Print at bottom of page" for my details B section.

I am using the method of having global variables to count rows and number of details within a group to figure when to force the page break. This way my data looks like:

FOAM CUPS
cup1 price1 cup3 price3 cup5 price5
cup2 price2 cup4 price4 cup6 price6

FOAM CONTAINERS
cont1 price1 cont2 price2 cont3 price3

LIDS
lid1 price1 lid3 price3 lid5 price5
lid2 price2 lid4 price4


Please help. I need another pair of eyes. [bugeyed]
 
Why do you have Print at bottom of page set for detail_b? Try removing that and then set up the multiple columns without checking "format groups with multiple columns". Then go to report->group expert->options and check "Keep group together".

-LB
 
Thank you for your post lbass. I am not quite sure I understand your reply.

I need to have the print bottom of page for detail_b because I am trying to force column breaks. The recordset behind this report looks like this:

cup1 price1
cup2 price2
cup3 price3
cup4 price4
cup5 price5
cup6 price6
.
.
.
lid1 price1
lid2 price2
lid3 price3 and so on.

At the request of my customer, I am trying to use white space wisely, and print the prices down then across. If I do not force the column breaks, there is too much white space to the right of the prices. That is why I am calculating the number of rows to print based on how many records will print for each product line.

I did have his working. However, I have changed something in the last couple weeks to break it. The only thing I can think of is I changed my crw32.exe object's compatability mode to "Windows 2000" (I have XP). I tried changing it back to XP compatability, but it didn't fix it.
 
Please explain where your records are and your report groups. I assumed you had a group on {table.item} and that you had formatted the columns with "format groups with multiple columns" UNCHECKED. That's all you really should need to do.

-LB
 
I am grouping by three table fields. First by customer, second by the price type (pallet price, case price, or volume price), a third the product line sort order. Then I have two sort fields, product sort order (not product line), and the product code. Here are some sample records:
Code:
                Price                  Prod   Prod Prod Line
Cust#   Price   Type    Product Line   Code   Sort Sort
------  -----   ------- ------------  ------ ---- ----------
12345   30.66   300 CTN  UFSMDR         1X1      2    1
12345   22.77   300 CTN  UFSMDR         2X2      3    1 
12345   22.77   300 CTN  UFSMDR         5X2      5    1 
12345   22.77   300 CTN  UFBGDR         9X2     10    2
12345   35.32   5 PLT    UFSMDR         1X1      2    1
12345   58.23   5 PLT    UFBGDR         9X9     15    2
You are correct in that I have the "format groups with multiple columns" unchecked. The forced column break works until it gets to the last column. This forces each product line group to print on a new page.

If you look at the formatting I have in my first post, the FOAM CUPS group, FOAM CONTAINERS group, AND LIDS group each print on a separate page.
 
I'm unclear on what the issue is--is it that you have a blank last page? Or that you don't want page breaks after each group? It also makes sense for you to share the formula you are using to force column breaks and also to explain your settings in the section expert. how does using print at bottom of the page fit into your method? Are you using this to force a new column?

-LB
 
Here is the thread I got the idea from. This idea worked, and then some how broke (thread181-27567).

The problem is that the last column, in each group, is forcing a page break. In other words, each Product Line group is printing on a new page.

I have turned off all "Keep Together" properties. I have a feeling I have an overflow issue, but I can't see it. I have 5 columns, each 1.1 inches long with .4 horizontal gap. My right/left margins are 1/.1.
 
Oops, wrong link. Here is the correct one. thread766-671327
 
This method will ALWAYS force a page break at the end of a group, since each column ends with a record at the bottom of the page.

If you can, change the column orientation to across then down and eliminate the detail_b altogether.

If this isn't an option, you can put the detail fields in a subreport that is formatted for multiple columns and is placed in the group footer section of the main report. Then uncheck "Can Grow" on the subreport and resize it until if forces the columns--you have to be careful though to size it so that the maximum number of fields in any instance of the subreport will be displayed.

-LB
 
Thank you for your reply.

Believe me, I tried to get the customer to accept the "across then down" method. They did not want that, which I understood.

I tried the subreport like you suggested, unfortunately, the size of the subreport I would need is too big. I end up with the same complaint, "too much white space".

 

Here is an interesting note.

I did have this working before. I just found a hard copy of the report when it was working. I am forcing a new column and my groups are printing on one page.
 
A very roundabout way of doing this would be to insert one subreport for each column in the report, e.g., 3 subreports, in the group footer. Link the subreports on the group field, e.g., cups, and then in each create a running total {#cntwingrp} that counts records, with no resets. Then go to the section expert and suppress the detail records in the subreports using formulas like:

//1st sub:
{#cntwingrp} > .333 * count({table.field})

//2nd sub:
{#cntwingrp} <= .333 * count({table.field}) or
{#cntwingrp} >= .667 * count({table.field})

//3rd sub:
{#cntwingrp} < .667 * count({table.field})

Minimize the subreports and have them set to can grow. There might be a better way, but I can't think of it right now.

-LB
 
Thank your for your help, lbass.

I have spoke with my customer, and we are going with a format close to what I had before. I am including the groups with columns and checked "print at bottom" for the footer. This way, the detail is more in a columnar format for each product line.

Code:
Small Cups    Big Cups     Containers   Lids
----------    --------     ----------   -----
sCup1         bCup1        Cont1        Lid1
sCup2         bcup2        cont2        lid2
scup3         bcup3
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top