Results 1 to 6 of 6

Thread: Printing

  1. #1

    Thread Starter
    Frenzied Member Technocrat's Avatar
    Join Date
    Jan 2000
    Location
    I live in the 1s and 0s of everyones data streams
    Posts
    1,024

    Printing

    Ok I had a project all finished and working till this morning when I got told that they wanted to change something, drop the use of Excel. Got to love when a project gets changed for no good reason.

    Anyway my program creates a HUGE report, something like 8000 pages. What I had working was the report was getting put in Excel. Then the user could go in and work with the data, or print it, etc. But now they want the data to go strait to the printer.

    So I need to know whats the best way to print to a printer (C++)something that well need to be formatted, with headers, columns, totals, etc.

    If someone has some sample code or a wrapper class to help me do the ASAP that would be great. The clock is against me.
    MSVS 6, .NET & .NET 2003 Pro
    I HATE MSDN with .NET & .NET 2003!!!

    Check out my sites:
    http://www.filthyhands.com
    http://www.techno-coding.com


  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Are they mad?

    Ok, there are a few printer functions that you use to get a HDC that references the printer. Then you draw to this HDC. There are two functions to start and to end a page.

    But the thing is, you must now do all the formatting yourself. That's going to take a while.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Frenzied Member Technocrat's Avatar
    Join Date
    Jan 2000
    Location
    I live in the 1s and 0s of everyones data streams
    Posts
    1,024
    Honestly I think they went and did a big hit of crack then decieded that Excel wasnt going to work. It was all done, I was going to fix 2 stupid bugs then make the install shield for it and call it a day. Do you know how tuff it is to figure out how to make Excel do things. I couldnt find many examples anywhere. Stupid MS makes it really hard to do things like that outside of VB

    Now they want this stuff as a raw print out. Luckily there is nothing more than text. I am making a wrapper using WritePrinter(). So far so good. But formatting is going to be my biggest problem. ARG I hate bosses sometimes.
    MSVS 6, .NET & .NET 2003 Pro
    I HATE MSDN with .NET & .NET 2003!!!

    Check out my sites:
    http://www.filthyhands.com
    http://www.techno-coding.com


  4. #4
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    You never know, they might suddenly change their fractured minds again and then they'll be blown away when you save everyone's ass with your excel prog.

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Yeah, make sure you have a backup of the current version.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  6. #6
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    Corned, at last we agree on something heh,

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