Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 2010 > BOOK: Visual Basic 2010 Programmer's Reference
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old February 22nd, 2013, 12:59 PM
Registered User
Points: 37, Level: 1
Points: 37, Level: 1 Points: 37, Level: 1 Points: 37, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2013
Location: Tampa Bay
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
Reply With Quote
  #2 (permalink)  
Old February 23rd, 2013, 06:01 PM
Rod Stephens's Avatar
Wrox Author
Points: 3,141, Level: 23
Points: 3,141, Level: 23 Points: 3,141, Level: 23 Points: 3,141, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2006
Location: , , .
Posts: 640
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!)
Reply With Quote
  #3 (permalink)  
Old February 23rd, 2013, 10:22 PM
Registered User
Points: 37, Level: 1
Points: 37, Level: 1 Points: 37, Level: 1 Points: 37, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2013
Location: Tampa Bay
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
Reply With Quote
  #4 (permalink)  
Old February 24th, 2013, 05:17 PM
Rod Stephens's Avatar
Wrox Author
Points: 3,141, Level: 23
Points: 3,141, Level: 23 Points: 3,141, Level: 23 Points: 3,141, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2006
Location: , , .
Posts: 640
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!)
Reply With Quote
The Following User Says Thank You to Rod Stephens For This Useful Post:
PaulDGoldstein (February 25th, 2013)
  #5 (permalink)  
Old February 25th, 2013, 11:12 AM
Registered User
Points: 37, Level: 1
Points: 37, Level: 1 Points: 37, Level: 1 Points: 37, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2013
Location: Tampa Bay
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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi Column - HTML printing problem ROCXY HTML Code Clinic 5 March 6th, 2008 09: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 08:53 AM



All times are GMT -4. The time now is 12:23 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.