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

vsFlexGrid printing

Status
Not open for further replies.

mmarino

Programmer
Mar 22, 2002
42
US
I'm using ComponentOne's vsflexgrid (version 7.0) to show data from a SQL database. I need to print the grid but I have to add a header to the page. I looked up the function they have vsflexgrid.PrintGrid, and all I can do is add a footer. I don't want to use a reporting program like Crystal because it would be overkill.
I tried using the Printer object from vb, and it sort of works, but the printout is kind of ugly. One of the columns in my grid is a text field of up to 500 characters (used for comments). I need to be able to print all of it, and that's where I run into problems with VB's printer object. What I ended up doing is cutting it into strings of the same length, which ends up splitting words in weird places). Anynody have any ideas/suggestions?
Thanks a bunch!
 
Use Split() to seperate on the spaces between words, and always make a new line if the wordlength is bigger then linelength.

-David
2006, 2007 & 2008 Microsoft Most Valuable Professional (VB)
2006 Dell Certified System Professional (CSP)
 
Thanks for answering. I ended up using vsflexgrid's PrintGrid method instead. I'm trying to find more documentation on it, but not having much luck. I want to put page numbers and I know there's a way, I just don't know how.

Monica
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top