Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have an ASP.Net 1 application, which includes database-driven electronic paperwork. The paperwork is entered into the system within this site, and users can view and print the notes online.

 

Right now, the printable reports are simply ASP.Net forms--the background code queries the database for the form, and echoes the results onto ASP Labels.

 

Being HTML-based reports, however, they do not always look good when printed--it's hard to get the page breaks correct, different users have different browsers, font settings, etc., and some forms have more lines of data entered in some text fields. As a result, some of the forms have the last few lines of data on top of an otherwise blank page.

 

What are some options for generating a clean printout from an ASP.Net application, such as writing out to a PDF template?

Posted (edited)

I normally take a look toward Crystal Decision which is included in some version of Visual Studio 2003.

 

Otherwise, you could look toward generating PDF report. Those, once generated, will ALWAYS be printer friendly.

Edited by Arch4ngel

"If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown

"Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me

"A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend.

C# TO VB TRANSLATOR

Posted
I normally take a look toward Crystal Decision which is included in some version of Visual Studio 2003.

 

Otherwise, you could look toward generating PDF report. Those, once generated, will ALWAYS be printer friendly.

Do you have any suggestions for a solution to generate PDFs? Do you have any sample source code for either of these methods?

Posted

Basically, PDF are just text with commands and everything but it's kinda hard to put togheter and generate one like that (really complicated specifications).

 

What we use here is a PDF Printer. Once it's printed, we can share it to everyone. I know there is also many differents tool to do the job. But here we use this PDF printer or the Crystal Decision coming with our version of VS2003.

 

Sadly, I don't have any code under hand to help you out.

"If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown

"Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me

"A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend.

C# TO VB TRANSLATOR

Posted

My colleague and I did search for some .Net examples for writing out to PDF. We found some examples which write out basic text and tables to a blank PDF, but we need a way to use a template for the form and write the results onto the appropriate place.

 

I assume Crystal Decision could spit out data onto a pre-built report. I am familiar with Crystal Reports, just not Decision.

Posted

It's basically the same thing but with some strip out features.

 

You might look online how to make reports out of it. Really nice and easy.

"If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown

"Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me

"A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend.

C# TO VB TRANSLATOR

Posted
As an alternative, CSS allow you to specify where page breaks occur, width of 'boxes' of data, etc. You can of coarse specify this stuff for 'print' only rather that screen. If you don't want to spend a small fortune on a package such as SRS or Crystal, spend $20 on a good CSS book (such as DHMTL and CSS for WWW), and use CSS to do all your printing. Don't by a Ferrari if all you need is a Toyota.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...