Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello,

 

I've gone though 3 pages of search about printing in .net here in the forums and I and I am not too much further along.

 

I've used an example of code in my Begining VB.Net book and am I able to use the SteamReader to print out a text file that has been manually created.

 

What I am trying to print consists of a header (with text and graphics), a main body which would be information that is within a msFlexGrid and then a footer with more text.

 

Its a sales program really. So a 'Bill To:' 'Ship To:' as the header (billto being left justified and shiptp being center justified), the body has the items, qtys, prices, extended prices, and then tallied up at the bottom of it (right justified for extended and total), and then some shipping info and terms as the footer.

 

In the PrinterDocument_PrintPage() function, the posts I have read use things like:

e.Graphics.DrawString(line, printFont, Brushes.Black, leftMargin, yPos, New StringFormat())

 

Which I assume when I get to the FlexGrid I would loop through it and insert the items in the 'line' argument. But if I have 5 items in a line that have to be formatted, can this be done? Or do I have to set up differnet 'format's of the DrawString function with the positions I want them set to and then cycle through the grid?

 

I am just lost when it comes to the printing. It seems to have a really high learning curve to it but once you get it, then its easy?!?

 

This is the only thing holding me back from finalizing my re-code project from going from VB6 to VB.Net :)

 

Thank you for any information, etc. This seems to be over my head but I really want to figure this out.

 

Cheers,

  • 1 month later...
Posted

I am just lost when it comes to the printing. It seems to have a really high learning curve to it but once you get it, then its easy?!?

 

This is the only thing holding me back from finalizing my re-code project from going from VB6 to VB.Net :)

 

Thank you for any information, etc. This seems to be over my head but I really want to figure this out.

 

For all you that don't want to use Crystal Report (I hate it: it seems to be written by a monkey) I've written a little free report engine that can be used in .Net apps.

 

Follow the link in the signature.

> NeoDataType.net <

Try my Free .Net Reporting Tool!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...