Print Several ASP.NET pages

  • Thread starter Thread starter Jay
  • Start date Start date
J

Jay

I have an application that uses the DataGrid to list several employees. You click on a button associated with an employee to display a report on one employee in a popup window. From that report you can print it. The report is semi-generated -- basically filling in some fields from a database. The report is fairly complicated, involving several tables and datagrids.

I have the need to print the reports for several employees all at once, rather than having to display each employee's report one at a time. The report itself is an aspx page, say report.aspx. Is there anyway I can fill in report.aspx for each employee, saving each report in one object that can then be printed. You get the idea.

Thanks. Jay
 
Jay,

Browsers don't allow much control over printing. Unless you're willing to
use an ActiveX control or other client-side component to facilitate batch
printing, your only real option for single-interaction printing of this type
of batch is to use a frameset. This frameset would have one frame per
employee, with each frame's source being your report.aspx page. For
example, you might end up with the following HTML for a given batch:

<html>
<head></head>
<frameset rows="*,*,*">
<frame src="report.aspx?EmployeeID=1">
<frame src="report.aspx?EmployeeID=2">
<frame src="report.aspx?EmployeeID=3">
</frameset>
</html>

If the above is rendered in an aspx page (say, ReportBatch.aspx), you could
use a repeater to generate the frame elements.

HTH,
Nicole


I have an application that uses the DataGrid to list several employees.
You click on a button associated with an employee to display a report on one
employee in a popup window. From that report you can print it. The report
is semi-generated -- basically filling in some fields from a database. The
report is fairly complicated, involving several tables and datagrids.

I have the need to print the reports for several employees all at once,
rather than having to display each employee's report one at a time. The
report itself is an aspx page, say report.aspx. Is there anyway I can fill
in report.aspx for each employee, saving each report in one object that can
then be printed. You get the idea.

Thanks. Jay
 
Nicole,

That's not a bad idea!! I think it should work.

Thanks. Jay
"Nicole Calinoiu" <ngcalinoiu REMOVETHIS AT gmail DOT com> wrote in message Jay,

Browsers don't allow much control over printing. Unless you're willing to
use an ActiveX control or other client-side component to facilitate batch
printing, your only real option for single-interaction printing of this type
of batch is to use a frameset. This frameset would have one frame per
employee, with each frame's source being your report.aspx page. For
example, you might end up with the following HTML for a given batch:

<html>
<head></head>
<frameset rows="*,*,*">
<frame src="report.aspx?EmployeeID=1">
<frame src="report.aspx?EmployeeID=2">
<frame src="report.aspx?EmployeeID=3">
</frameset>
</html>

If the above is rendered in an aspx page (say, ReportBatch.aspx), you could
use a repeater to generate the frame elements.

HTH,
Nicole


I have an application that uses the DataGrid to list several employees.
You click on a button associated with an employee to display a report on one
employee in a popup window. From that report you can print it. The report
is semi-generated -- basically filling in some fields from a database. The
report is fairly complicated, involving several tables and datagrids.

I have the need to print the reports for several employees all at once,
rather than having to display each employee's report one at a time. The
report itself is an aspx page, say report.aspx. Is there anyway I can fill
in report.aspx for each employee, saving each report in one object that can
then be printed. You get the idea.

Thanks. Jay
 
Back
Top