Formatting data for a report
-
(Using VSC++ 6 - MFC) I've looked through several articles (such as Printing with MFC Made Easy by Dan Pilat) and posts but, the information I'm looking for just isn't there. Plus, this is something that I want to do on my own, I just want to understand how it works; not have someone do it for me. I'm trying to get data from a list control straight to the printer and have it formatted correctly. So far, everything I've tried hasn't worked. I've tried setting up tabs, but the printer prints them out as little squares. I've tried to manually set where each piece of information should print out at (x and y coordinates), but it's not working either, especially if the size of the string being printed changes (it throws everything else off). Basically, here's what I want to set up and what I'm looking for some help with:
Column #1 Column#2 Column #3 (and so on)
Some data here Some more Right-aligned dataBecause this is pretty much how it's coming out (or some variation thereof):
Column #1 Column#2 Column #3 (and so on)
Some datSome moreRight-aligned dataAny ideas on how I can get the information to format correctly? Any help is appreciated.
-
(Using VSC++ 6 - MFC) I've looked through several articles (such as Printing with MFC Made Easy by Dan Pilat) and posts but, the information I'm looking for just isn't there. Plus, this is something that I want to do on my own, I just want to understand how it works; not have someone do it for me. I'm trying to get data from a list control straight to the printer and have it formatted correctly. So far, everything I've tried hasn't worked. I've tried setting up tabs, but the printer prints them out as little squares. I've tried to manually set where each piece of information should print out at (x and y coordinates), but it's not working either, especially if the size of the string being printed changes (it throws everything else off). Basically, here's what I want to set up and what I'm looking for some help with:
Column #1 Column#2 Column #3 (and so on)
Some data here Some more Right-aligned dataBecause this is pretty much how it's coming out (or some variation thereof):
Column #1 Column#2 Column #3 (and so on)
Some datSome moreRight-aligned dataAny ideas on how I can get the information to format correctly? Any help is appreciated.
There are several articles here[^] that will likely provide useful information and perhaps even a canned class that you can use to achieve your goal. Btw, I cheat by writing my app's[^] contents to a temporary HTML file and printing that. Works beautifully with any paper size and both landscape/portrait modes! /ravi My new year's resolution: 2048 x 1536 Home | Articles | Freeware | Music ravib@ravib.com
-
There are several articles here[^] that will likely provide useful information and perhaps even a canned class that you can use to achieve your goal. Btw, I cheat by writing my app's[^] contents to a temporary HTML file and printing that. Works beautifully with any paper size and both landscape/portrait modes! /ravi My new year's resolution: 2048 x 1536 Home | Articles | Freeware | Music ravib@ravib.com
Thanks for the links and tips. I have read through some of those articles that seemed to be the best ones for what I'm looking for. However, I haven't been able to find any that actually show how the data is formatted for the printed report (unless I missed it somewhere - always possible). I guess I'll just keep combing through them until I come across what I'm looking for or I figure it out for myself. Again, thank you.