Is there a way to create Data Reports (as in VB 6) in ASP (Not ASP.Net) ? I need to create an ASP site for an intranet which will be used to view and print formatted MIS reports from the client browsers. Is there a way to do it without buying 3rd party tools like Crystal reports ?

First: do you have a database with the info to report, that you can access via asp?

Simple asp and sql is all you need here.

I am planning to use Oracle 10g database. I have been out of touch with ASP for a long time, so I am almost a newbie now. My requirement is that the formatted reports can be printed (with Report Headers & Footers, Page Headers, Page Nos, Page breaks, etc) from the client browser. How can I do it directly via ASP ? Do I format the data to a (new) browser window and print that window ?

I last did an ASP project more than 6 years ago, in which we printed reports using Crystal Reports.

Could you give some tips as to how I can print the report from the browser ?

regards

Do I format the data to a (new) browser window and print that window ?

That's what I would do.
Normally you have all sorts of graphics on a page and perhaps other elements that have been given exact heights and widths, which is likely to mess up a print of the page.

A common way of doing this is to let the user navigate to the report they want to print, and then having a "print this" link/button somewhere. This link/button will then link to a page in a (new) window that displays only the report in standard formatted html.
If you display the report in a table you just set the table width to "100%". This will make the browser fit the report to a sheet of paper, if you specify a width greater than that of a sheet of paper it won't print right.

Also, on the printer friendly page you could add a piece of javascript like

window.print();

to open the printer dialog as soon as the page opens.

Does this help you at all? ;-)

Actually this does not help me. As I had stated already I need an option to print formatted MIS reports with Page Headers, Page Nos, etc. Also I might need to print different groups (sections) of a report in different pages. If I have to print an HTML file directly from the browser, I have no control over the pagination as I don't know the printer/page size, etc of the client printer.

Reporting tools like Crystal Reports or Data Reports handles these things automatically, so it is far more convenient to create reports using those. Simply generating an HTML and printing it will not meet the requirements.

regards

This article has been dead for over six months. Start a new discussion instead.