?
Solved

A97 report: how to force column break

Posted on 2000-02-22
13
Medium Priority
?
771 Views
Last Modified: 2010-05-18
I have an Access 97 report that has 2 columns in the detail section. I just want to do a column break on certain detail records.

The table the report is based on has a Yes/No field, let's call it MyColBreak. When a detail record is printed and MyColBreak is true, I want to force the report to go to the next column. I have tried setting the NewColOrRow property in the report, using code in the report's Detail_Format, but that didn't work. I also put this code in the Group Header Format event.

Note that these detail records are also grouped and I have the KeepTogether property set to True so no group will span between columns.

How do I do this?

0
Comment
Question by:gigo30
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 5
13 Comments
 
LVL 10

Expert Comment

by:brewdog
ID: 2547298
Is there some rhyme or reason to the records you have marked as MyColBreak? Would it be possible to set up another group level instead?
0
 
LVL 1

Author Comment

by:gigo30
ID: 2547365
Yes there is a reason. These are 1 page reports. I want the details of the report to look as balanced as possible. So 10 details in the right column, and 9 details in the left would be about balanced.

My table is set up like this:
- Itemnum (unique id)
- Class (text field)
- Group (number field)
- Item (text field describing item)
- Itemorder (number field. Used so if I insert items between existing items 5 and 10, it will be in the right position.)
- Header (yes/no field)
- MyColBreak (yes/no field)

If Header=true then I make a text box in the report detail use a grey background. Otherwise I make the other text box in the detail visible.

The users of these reports are real picky so I have to do a manual column break sometimes.
0
 
LVL 10

Accepted Solution

by:
brewdog earned 300 total points
ID: 2547497
Well, I just played with this, and unfortunately, I don't know if you're going to be able to do it without setting up some other grouping. I have two ideas:

1. Could you create a field called "ColumnNumber" instead of your MyColBreak and enter 1 or 2 for the column in which the data should appear? Then you could have a Grouping on ColumnNumber and change the NewRowOrColumn property of the Group Header or Footer.

2. What about changing the Page Setup to print records Across and then Down instead of Down and then Across? Your records would be even between columns then . . .

brewdog
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 1

Author Comment

by:gigo30
ID: 2547880
I'll try #1. That might work.

Can't do #2. These records must be in a specific vertical order.
0
 
LVL 10

Expert Comment

by:brewdog
ID: 2547886
I thought that might be the case, but it was worth a shot.
0
 
LVL 1

Author Comment

by:gigo30
ID: 2550675
I made another grouping called ColumnGroup. It works in most cases where both columns will not fit in the first column. But when I only have a few items, and both column groups will fit in one column, I get an extra blank page after the report. This is because I had to set the ColumnGroup group footer property "NewRoworCol" to "After section". Also in the grouping/sorting window, for that group I have "Keep together" set to "Whole group".

How do I get rid of that blank page? Actually, it's a page with a header and footer, but no details. It seems I would have to set the group footer ColumnGroup property "NewRoworCol" to "None".  But then for a short report, all items will print in the first column.

Hundreds (about 550) of these reports will print when they are printed, and I don't want to end up with hundreds of unusable pages.
0
 
LVL 1

Author Comment

by:gigo30
ID: 2550682
Also, the NewColorRow property of the group header or footer is only settable in VBA when the report is in design mode. But when the report formats column 2, I can't really go back to design mode and set NewRoworCol to "None".

I just want to force a column break for certain detail records.
0
 
LVL 1

Author Comment

by:gigo30
ID: 2550704
Edited text of question.
0
 
LVL 1

Author Comment

by:gigo30
ID: 2558977
#1 worked. By adding another group field to break on a group.
0
 
LVL 10

Expert Comment

by:brewdog
ID: 2558987
Sorry I wasn't able to get back on this more quickly. Is this still "mostly" working, or is it *really* working now?
0
 
LVL 1

Author Comment

by:gigo30
ID: 2559393
Well, when the 2 column groups will both fit on 2 columns, I had to add blank records to the end of column 1, then it would break properly.

Otherwise, it worked fine.
0
 
LVL 10

Expert Comment

by:brewdog
ID: 2559416
good workaround. That is the lion's share of programming, I find.
0
 
LVL 1

Author Comment

by:gigo30
ID: 2564884
Should have read:
Well, when the 2 column groups will both fit on 1 column, I had to add blank records to the end of the records for column 1, then it would break properly.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question