Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Billing, Invoiceing, Reporting Program 1

Status
Not open for further replies.

carlg

Programmer
Jun 23, 2004
88
US
I will be working on an application written in the C language that will do Billing and Invoicing.

The C program will actually generate the images of the bill or invoice and output to a text file.

Anybody know of any nice examples of this type of program out on the web anywhere that I can see?

I'm just wondering if there's a nicer way to doing it that having a bunch of printf's.

Also trying to figure things out like how many characters per line I should have and things like that.

Thanks for any info

carl

 
Carl,

Are you thinking of creating just dumb text layouts?
If so then your printfs might be the simplest way.
You could, however, generate something more sophisitcated like postscript or even acrobat pdfs. There should be a few libraries around to help you do that and you could embed images and draw lines with tools like that.
Another idea is to generate "rich text format" for similar reasons.
One trick I've used is to use a tool like Word to generate the rtf but build in placeholders for the content like "%%invoicenum%%" and then later use that document as a template and simply replace the placeholders for the actual data.

Hopefully that's give you some ideas and maybe helped improve the look of your invoices and reports.



Trojan.
 
What I have done in past is generate a data file for input into the Word Mailmerge Program.

The docs exist as Word Documents, and you can even dynamically change the Document that you want to print.

I had all the letters (different for each client) set up as word documents, and the data dictated the form to print.

 
Outputting HTLM is another way of producing reasonably well presented text with fairly minimal effort on your part, especially if you already know a bit of HTML.

It's also amenable to the templating idea that TrojanWarBlade suggested.

--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top