codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  how to print a report having many records.  Archive Import (Simi) at 05:46 on Saturday, July 12, 2003
 

I have generated a report using ASP. Its a table having more than 1000 records. While taking a print out of this page, I want to display the header of the page (the company logo & the column names) everytime a new page is printed. Does anyone have a solution to this?...pls help.

Thank you

  Re: how to print a report having many records.  Troy Wolf at 13:09 on Tuesday, July 15, 2003
 

If you find a good solution, please post it back here. This is an age old issue with the browser environment -- it does not cater to printed reports. Most solutions I`ve seen are quite complicated. The best solution I think is to have a server-side process that generates a PDF from the data. This actually isn`t that difficult to do, but like anything new to you, is completely abstract until you`ve done it once. Server-side PDF generation requires purchasing and installing fairly expensive third-party components. One popular one is ActivePDF.

I think you will find this Microsoft article useful. It describes the Style Sheet methods for controlling printing format--including page breaks.

http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dynstyle/printing.asp

If you know how many lines of data including your headers will fit per page, you can use a special printing style sheet to force page breaks every so many records, print the header row, then print another so many records, and so on.
Troy Wolf: site expert
SnippetEdit Website Editor


  Re: how to print a report having many records.  Troy Wolf at 13:15 on Tuesday, July 15, 2003
 

Oh, another thing that you may find useful is this free ActiveX tool:

http://www.meadroid.com/sx_intro.asp

What this does is allow you to temporarily remove the default browser header and footers that normally print. You can also set margins, orientation, etc -- programmatically within your ASP code.

This works well for sites where you have some control over your user base. For public use sites, the downside is that they will get a popup asking them to allow the ActiveX to install. Many users are scared to allow scripts to install--and for good reason. I`m using it, and it has not caused any problems.
Troy Wolf: site expert
SnippetEdit Website Editor









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
• Re: store string from text file to vector
• Re: c# .net Exception of type System.StackOverflowException was thrown.
• Re: error: expression must have a constant value
• Re: Script Does Folder Exist – If Not Create It
• $_GET not working
• GET METHOD
• Re: windows service - web service - com
• Re: Storing data from HTML to Excel or TXT
• Re: Help totalReads=1 totalReads++=2 write totalReads 3 not 2


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2010