CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 5 of 5
  1. #1
    Join Date
    May 2013

    Alignment on Printer.print

    Hi guys!

    after many problems with data reports, crystal reports and things like that, i'm decided to use the Printer.print.

    I made a simple class, that class receive a ListView Control and after i export the data of the listview to some array. Finally i can get the columheader titles, and the other records to print through the printer.print.

    After got all the listview lines, i print them column by column, and i'm looking for some way to auto generate the spaces between columns. This way, that class could receive only a listview control and auto generate a report.

    any idea to auto generate column spaces on my document made by Printer.print?

  2. #2
    Join Date
    Dec 2001

    Re: Alignment on Printer.print

    Can't you use the Space$() function?
    Please remember to rate the posts and threads that you find useful.
    How can something be both new and improved at the same time?

  3. #3
    Join Date
    Jul 2005

    Re: Alignment on Printer.print

    IMHO You are going to have more problems using Printer object than using "DataReport or Crystal Reports or things like that"

    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

  4. #4
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008

    Re: Alignment on Printer.print

    I generally use the Printer.CurrentX and Printer.CurrentY for positioning the text of the page where I want it.

    Using a report tool would be much easier but if you must use the Printer object I would suggest using CurrentX and CurrentY as that gives you full control
    Always use [code][/code] tags when posting code.

  5. #5
    Join Date
    May 2013

    Re: Alignment on Printer.print

    Thanks a lot to all of you...

    I'm almost reaching my objective!

    Now, i offer to user some options to customize the report layout... options like font size and font style. But, when i change this options, it seems to load the options to memory and when i try to change again, i lost my text align.

    Can i reset all the last propertis of the printer.print?

    :P i think, solving this problem i will be finished.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width