Wrox Programmer Forums
|
BOOK: Visual Basic 2010 Programmer's Reference
This is the forum to discuss the Wrox book Visual Basic 2010 Programmer's Reference by Rod Stephens; ISBN: 9780470499832
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Visual Basic 2010 Programmer's Reference section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 22nd, 2013, 01:59 PM
Registered User
 
Join Date: Jan 2013
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
Default Column breaks in Printing a Report

I have an Access Report that I am trying to convert over to VB2010. The program actually creates 2 reports...one which is mainly graphics and a little text, I was able to convert cleanly into VB.
The second one is much more like a standard Access Report: Group breaks, and yes...it wraps to a 2nd Column on the page (like Word would).
I know that I could probably break the page up into two separate ParagraphInfo(s) one for the left column and one for the right...but is there a way of doing this in the actual definition of the ParagraphInfo object?
Thanks for your time in advance.
Paul Goldstein
 
Old February 23rd, 2013, 07:01 PM
Rod Stephens's Avatar
Wrox Author
 
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default

Do you mean the ParagraphInfo class from this example:

http://www.vb-helper.com/howto_net_print_long_text.html

Or from somewhere else?

The ParagraphInfo object in that example just holds information about text to be printed and doesn't include any logic for wrapping across columns. That would be a good addition to the example but it's not there now.

Sorry.
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)
 
Old February 23rd, 2013, 11:22 PM
Registered User
 
Join Date: Jan 2013
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi Rod,
Thanks for the reply. Yes, I'm referring to the example in the book (that's how I knew how to generate a report in the first place). I downloaded the example and saw how the text (from the book) was inserted into the ParagraphInfo.
So...then...if I can't do it in ParagraphInfo (have a column break), is there another object that does this? Or, do I have to basically divide my page into two sides and then write some code to calculate what goes on the left (column), and then what goes on the right?
Thanks again for your reply.
Paul
 
Old February 24th, 2013, 06:17 PM
Rod Stephens's Avatar
Wrox Author
 
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default

Take a look at this example:

http://www.vb-helper.com/howto_net_p...ulticolumn.zip

It's probably not exactly the same as what's in the book so you may need to modify it slightly.

The basic idea is to make a list of RectangleF structs giving areas to print. Then for each of those, the code loops through the ParagraphInfo objects as before printing as much as will fit in the RectangleF.

It seems to work reasonably well.
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)
The Following User Says Thank You to Rod Stephens For This Useful Post:
PaulDGoldstein (February 25th, 2013)
 
Old February 25th, 2013, 12:12 PM
Registered User
 
Join Date: Jan 2013
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi Rod,
I figured that's what I'd have to do. I already have a lot of the layout from Access report, I'm just going to have to convert the concept of how much to print on the page over from the example and go with it.
Thanks for the suggestion.
Paul





Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi Column - HTML printing problem ROCXY HTML Code Clinic 5 March 6th, 2008 10:53 AM
Page-Breaks when printing saf ASP.NET 2.0 Basics 0 May 2nd, 2007 07:00 AM
Printing column lines in report soc22 Access 0 October 2nd, 2006 09:36 AM
Printing Report rfarmer VB How-To 1 September 27th, 2006 06:39 AM
Error While printing report (Crystal report) vikaspaweb Pro VB 6 0 March 8th, 2004 09:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.