Printing.

  • Thread starter appearinggalaxy
  • Start date
A

appearinggalaxy

Hi,

I am trying to churn out some statistical data from database and
print it out by using printdocument and printdialog, but I realised
that the alignment of the data is gone, for instance, I use "vbTab",
but seems like it does not take effect on preview screen.

I am vex on this issue and would like to ask for the advice from
anyone who knows how to develop a good reporting module by using .net
printdocument and printdialog.

Thanks.
 
R

Ron Allen

I do a lot of reports using PrintDocument and you just have to align the
items yourself. I set up an array of horizontal indents and vertical
positions and use these to draw on the printable area. Just pass in your
data in an easily parsable format and this works fine. I use XmlDocument
objects to contain the printing data since we have to send reports between
offices and this allows sending a simple file attachment. I paginate the
data before putting it into the deliver document and have specialized
PrintDocument classes for each document type to be printed. When printing I
just navigate through the DOM elements contained in each page element and
place them as desired.
This methodology makes it easier for me as I don't have to emit all the
elements in a specific order as they are selectable using SelectSingleNode
or SelectNodes for navigation.

Ron Allen

appearinggalaxy said:
Hi,

I am trying to churn out some statistical data from database and
print it out by using printdocument and printdialog, but I realised
that the alignment of the data is gone, for instance, I use "vbTab",
but seems like it does not take effect on preview screen.

I am vex on this issue and would like to ask for the advice from
anyone who knows how to develop a good reporting module by using .net
printdocument and printdialog.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Printing a .dat file 2
RichTextBox Printing problem? 1
Newbie to printing 4
Printing a WinForm as a Graphic 6
Printing 3
Printing from IE hosted control 1
Webbrowser printing 1
Printing an HTML document 1

Top