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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

printing/printing reports from the DB thru an asp

Status
Not open for further replies.

ifeyinwa

Programmer
Mar 26, 2003
112
US
Have 2 intresting Q
* Is there a way I can put a print button on my asp that will actually print the current Screen opened.

*My asp has an access backend.On my asp page can I have a button that can actually print a report from the Acesss Database.ie a button that will go the report section of access DB and print teh report that I want

a way to get around with the appropriate codes will be appreciated as I am new to programming.
thanks
 
1. This one is easy, simply make a button like so:
Code:
<input type=button value=Print onclick='window.print()'>
2. This one will probably not be so easy. I'm not aware of any way in asp to print straight from the database. You might wanna post that question in the ASP forum, but I don't think it's possible. However, you could create a popup box to pull the information and print it from the database similar to the example I showed above.

-kaht

banghead.gif
 
Okay how do I this . " However, you could create a popup box to pull the information and print it from the database similar to the example I showed above.
 
I will assume that you know how to pull the information to a database. I will even further assume that you know how to create a table to display that information. Write these processes up in a seperate .asp file (or in whatever server side language you use) and then add a button to your original page like this:

<input type=button value='Print Database Values' onclick='window.open("datatable.asp", "", "width=300, height=200")'>

make sure in the seperate file you use to display/print the data in a table that you add this to the body tag:

<body onload='window.print(); self.close();'>

-kaht

banghead.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top