473,324 Members | 2,581 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

How to generate an invoice from data

I need to be able to generate an invoice from an ASP page. Currently, the
invoice is drawn in a web page and my client prints the page from their
browser. This doesn't work too well in terms of graphics resolution and also
requires endless positioning tweaking on my part.

Is there a way to use Word or Excel on the client, and send the invoice data
down so that some sort of invoice template could be used? This needs to work
on a Mac and ideally on a PC as well. The client machines have Office
installed. I'm thinking this would be the best way to eliminate the
positioning and resolution problems.

Thanks in advance,
Pete
Jul 19 '05 #1
7 4154
In article <#T**************@TK2MSFTNGP12.phx.gbl>,
yo*****@attbi.no.com.spam.please says...
I need to be able to generate an invoice from an ASP page. Currently, the
invoice is drawn in a web page and my client prints the page from their
browser. This doesn't work too well in terms of graphics resolution and also
requires endless positioning tweaking on my part.

Is there a way to use Word or Excel on the client, and send the invoice data
down so that some sort of invoice template could be used? This needs to work
on a Mac and ideally on a PC as well. The client machines have Office
installed. I'm thinking this would be the best way to eliminate the
positioning and resolution problems.


What you are asking is possible, but has it's problems.

Of course the end user would need the program used to open the file in.

You state you do not want to use HTML (generated via ASP) to display the
invoice. I would suggest rethinking that. Graphics resulution should be
no problem at all. Just about any resolution available in Word or Excel
should work fine in HTML layout. Positioning and tweaking seems strange
as well. Usually either Word or Excel use some sort of table (Excel
basically being a big table anyway) which can be replicated in an HTML
table easily.

Can you provide an example of what you are trying to produce as an
invoice? Maybe my idea of an invoice is different from yours :)

Dan
--

Remove NOT from email address to reply. AntiSpam in action.
Jul 19 '05 #2
Hi Dan,

Thanks for the reply.
You state you do not want to use HTML (generated via ASP) to display the
invoice. I would suggest rethinking that. Graphics resulution should be
no problem at all. Just about any resolution available in Word or Excel
should work fine in HTML layout.
The problem I'm having with resolution is the client wishes to have a
corporate logo at the top of the invoice. Screen resolution is 72 dpi, but
to get a good printout of their logo, the image needs to be roughly 300 dpi.
What I see happen then is that the image is huge. I presume because the rest
of the page is 72 dpi. If I set the image resolution at 72 dpi, it prints at
the correct size, but looks pretty bad due to the low resolution.

The current workaround is for them to print the logos from a graphics
program first, then put the paper back in and print the invoices without
images.
Positioning and tweaking seems strange
as well.
The problem is that different browsers print the page differently. I
initially made it to look good in IE on Windows, but when it was printed
from IE on Mac, it wasn't centered. Tweaking the positioning got it to work
on the Mac. But now, due to a bug in IE on the Mac (it keeps dumping it's
cookies and the user's session gets lost) this client is using the new
Safari browser, which is printing it in a whole different way, and part of
the invoice is cropped. Not only that, but another client will also be
needing to print these, but from IE in Windows. I suppose I could detect the
browser and render it differently per browser. That still doesn't fix the
image resolution problem though.
Can you provide an example of what you are trying to produce as an
invoice? Maybe my idea of an invoice is different from yours :)


Unfortunately, the invoice is part of a private site and I can't post a URL
to it. If need be, I can put something static together, though without the
client's actual setup, it's tough to demonstrate exactly what I'm seeing.
It's just a basic invoice, with a logo at the top. It looks decent, I'm just
tired of having to adjust the HTML due to browser variances in printing, and
the client is tired of the extra print operation with the logo.

I'll turn the table on you a bit. Do you know of an example of this type of
operation that prints the same from all browsers and on all platforms?

Otherwise, I would really like to get away from browser-dependent printing.
It seems to me that there should be a way to send down the data, perhaps in
XML format or perhaps in a doc or xls format, and then let Word or Excel
handle it in a rich-client setting. (All users of this system have Office.)
Or if there's a piece of software like Crystal Reports that can handle this,
I'm all ears. I'm not at all familiar with the options here, or if there
even are any.

Thanks again for the help,
Pete
Jul 19 '05 #3
You can create the basic design in Word (or whatever) with little
placeholders embedded wherever you want your dynamic content to appear. Save
as a RTF and whack it on the server. Then, in your ASP, use a FSO to read in
the template and replace the placeholders with your actual content. The RTF
spec isn't simple (search microsoft.com if you're really keen) so I normally
just reverse-engineer the bits I have to after opening the template file in
InterDev, notepad, etc.

If you're careful you can concatenate multiple documents (from multiple
iterations using the same template) into one, create and then insert little
RTF tables on the fly, etc.

For data best presented in a spreadsheet I normally just Response.Write it
out as tab separated values.

Alan
"Peter Young" <yo*****@attbi.no.com.spam.please> wrote in message
news:#T**************@TK2MSFTNGP12.phx.gbl...
I need to be able to generate an invoice from an ASP page. Currently, the
invoice is drawn in a web page and my client prints the page from their
browser. This doesn't work too well in terms of graphics resolution and also requires endless positioning tweaking on my part.

Is there a way to use Word or Excel on the client, and send the invoice data down so that some sort of invoice template could be used? This needs to work on a Mac and ideally on a PC as well. The client machines have Office
installed. I'm thinking this would be the best way to eliminate the
positioning and resolution problems.

Thanks in advance,
Pete

Jul 19 '05 #4
Interesting fix for the logo issue:

Have the graphic at 300dpi and in the page set the width and height of
the image to be "20%" [roughly 72/300]

eg.

<img src="300dpiimage.jpg" width="20%" height="20%"/>

That should give you the correct 'size' on the screen and also a 300dpi
print image when printed from IE (at least I think it did when I was messing
with print layouts for online maps).

Chris.

"Peter Young" <yo*****@attbi.no.com.spam.please> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi Dan,

Thanks for the reply.
You state you do not want to use HTML (generated via ASP) to display the
invoice. I would suggest rethinking that. Graphics resulution should be
no problem at all. Just about any resolution available in Word or Excel
should work fine in HTML layout.
The problem I'm having with resolution is the client wishes to have a
corporate logo at the top of the invoice. Screen resolution is 72 dpi, but
to get a good printout of their logo, the image needs to be roughly 300 dpi.
What I see happen then is that the image is huge. I presume because the rest
of the page is 72 dpi. If I set the image resolution at 72 dpi, it prints at
the correct size, but looks pretty bad due to the low resolution.

The current workaround is for them to print the logos from a graphics
program first, then put the paper back in and print the invoices without
images.
Positioning and tweaking seems strange
as well.
The problem is that different browsers print the page differently. I
initially made it to look good in IE on Windows, but when it was printed
from IE on Mac, it wasn't centered. Tweaking the positioning got it to work
on the Mac. But now, due to a bug in IE on the Mac (it keeps dumping it's
cookies and the user's session gets lost) this client is using the new
Safari browser, which is printing it in a whole different way, and part of
the invoice is cropped. Not only that, but another client will also be
needing to print these, but from IE in Windows. I suppose I could detect the
browser and render it differently per browser. That still doesn't fix the
image resolution problem though.
Can you provide an example of what you are trying to produce as an
invoice? Maybe my idea of an invoice is different from yours :)


Unfortunately, the invoice is part of a private site and I can't post a URL
to it. If need be, I can put something static together, though without the
client's actual setup, it's tough to demonstrate exactly what I'm seeing.
It's just a basic invoice, with a logo at the top. It looks decent, I'm just
tired of having to adjust the HTML due to browser variances in printing, and
the client is tired of the extra print operation with the logo.

I'll turn the table on you a bit. Do you know of an example of this type of
operation that prints the same from all browsers and on all platforms?

Otherwise, I would really like to get away from browser-dependent printing.
It seems to me that there should be a way to send down the data, perhaps in
XML format or perhaps in a doc or xls format, and then let Word or Excel
handle it in a rich-client setting. (All users of this system have Office.)
Or if there's a piece of software like Crystal Reports that can handle this,
I'm all ears. I'm not at all familiar with the options here, or if there
even are any.

Thanks again for the help,
Pete

Jul 19 '05 #5
In news:%2******************@TK2MSFTNGP12.phx.gbl,
Peter Young <yo*****@attbi.no.com.spam.please> typed:
: I need to be able to generate an invoice from an ASP page. Currently,
: the invoice is drawn in a web page and my client prints the page from
: their browser. This doesn't work too well in terms of graphics
: resolution and also requires endless positioning tweaking on my part.

Yes, because the *browser* is printing a web page, not a form.

: Is there a way to use Word or Excel on the client, and send the
: invoice data down so that some sort of invoice template could be
: used? This needs to work on a Mac and ideally on a PC as well. The
: client machines have Office installed. I'm thinking this would be the
: best way to eliminate the positioning and resolution problems.

I would suggest PDF format over Word/Excel. Unless the data needs to be
edited for some reason. The one reason I am suggesting PDF is because of
it's availiability on PC/Mac.

I guess my other question is how many invoices are to be view/printed this
way? If it's many (your call as to what qualifies as many), spend the money
for some PDF tools.

My 2 cents,
Donald Verhagen
Jul 19 '05 #6
Pagination can be a problem when using HTML to generate reports. With RTF,
because it's ASCII-based you have pretty good control over the behaviour and
content of the document, you can edit the content after it's been rendered
(pro and con), and it's a free solution. It also works well with my user
base of PCs/Macs, different browsers, etc.

I would also be interested in a PDF solution though. Are any of the
components free and able to create multi-page documents from database data?

Alan

"terje" <il********************@hotmail.com> wrote in message
news:bg************@ID-88092.news.uni-berlin.de...
Twice a month I recieve an html page filled with cols and rows with text and it prints perfectly. I checked the html and it was all placed into html
tabels. The positioning is done by doing absolutely everything in %: <table width ="100%"><tr><td width="55%" /18% 6% ... Ok there is no graphics on the page, but if you have only one logo at the top, why not print that first as you said you already are doing and then do the rest with html?

terje

Jul 19 '05 #7
Thank you all for the feedback. I'm going to investigate the PDF components
out there. That would seem to provide the most flexibility.

Anyone have a recommended component?

Thx,
Pete

"Peter Young" <yo*****@attbi.no.com.spam.please> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
I need to be able to generate an invoice from an ASP page. Currently, the
invoice is drawn in a web page and my client prints the page from their
browser. This doesn't work too well in terms of graphics resolution and also requires endless positioning tweaking on my part.

Is there a way to use Word or Excel on the client, and send the invoice data down so that some sort of invoice template could be used? This needs to work on a Mac and ideally on a PC as well. The client machines have Office
installed. I'm thinking this would be the best way to eliminate the
positioning and resolution problems.

Thanks in advance,
Pete

Jul 19 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: The Blob | last post by:
Hi all, I have a problem trying to generate the u/m list of customer. I am trying to generate a list of customer whoes last commence date is jan 04 to current. It is part of a billing...
3
by: David B | last post by:
I am creating invoices for an app I am busy with. The transactions for the invoice come from 2 tables which store Sales and Facilities Hire. The current arrangement is that I create a temp...
15
by: NomoreSpam4Me | last post by:
Hi there i have a little problem with my invoice. Here it is: i have a main menu with buttons, one of my button is "Create new invoice", when click on it a form pop up so i can enter my...
3
by: Guoqi Zheng | last post by:
Dear sir, Our E-commerce site needs to print out a few 100s invoice a day. I do not know what is the best way to print invoice. Those invoice has to be printed on a very precise position on our...
1
by: Herman Beeksma | last post by:
Hi there! I have two tables: Customer (ID, Name) Invoice (ID, Date, Customer, Amount) and want to select only the *last* invoice for each customer. It's easy to get each customer's last...
3
by: abadi | last post by:
I have ready invoices and I want to enter the invoice information in a form then print the entered information on the invoice. The enter information is not stored in the database. I tried to make a...
0
by: GaryB | last post by:
I have a form from accounting, it is an invoice. With 1 data field. Most customers only have a few items on the invoice but I have a few that create invoices of 3 or 4 pages. Can anyone help me...
4
by: lawazia | last post by:
I am doing a project in which I have to create INVOICE reports I am using VB6 and Active reports. I am facing problem while creating a multipage invoice report. If the invoice report generated...
4
by: gazza10001 | last post by:
Hi i hope you can help my company uses access and has modified for its needs usually what happens is you serach for the invoice by its number and then it brings all the information up such as...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.