views:

189

answers:

5

I am too cheap to buy crystal reports so i built the report in asp.net, the only problem I'm facing is printing the report and making it look professional. On different printer's the report looks diff, i want to be able to control the final output and make the report print standard across all printers. You guys have any suggestions on how to achieve this properly?

+1  A: 

You could try printing to a PDF. Not sure what your budget is, but ExpertPDF is a good option I'm using now.

Babak Naffas
I would be willing to bet that there are some open source PDF libs available, too.
Muad'Dib
I did some research on this last week. Couldn't find anything open source that handled HTML/CSS to PDF well. In terms of time spent vs cost, a commercial solution may end up cheaper.
Babak Naffas
I'm low budget man. Just a college student trying to pay the fees
ferronrsmith
Then reporting services it is.
Babak Naffas
A: 

You could create the report as a PDF using a C# library such as PDFsharp (Open-Source).

This approach allows you to:

  • Serve PDF files to your user, giving them the option to:
    • print it now
    • archive it for later use
  • Automatically email reports to your users using a scheduled task
  • Store generated PDFs in a database or on the file system
Andrew Moore
Can someone explain why the -1?
Andrew Moore
Well, I apparently ticked off someone who down voted without any valid reason.
Andrew Moore
It happens a lot these days - sadly nobody sees fit to state their objections.
CJM
I don't understand why the down vote. I gave it a plus1.
auujay
This library is too complex for what i wanted to do, so I decided to find a more suitable solution.
ferronrsmith
A: 

cutePDF is a free PDF writer and should work for what you need

northpole
-1: That's a Printer PDF writer...
Andrew Moore
and I am suggesting trying this to see if printing to a PDF helps with his issue.
northpole
@birdlips: The original poster has no control over the print configuration of his users. He is trying to fix the problem server side. A printer that writes PDF will not fix this problem.
Andrew Moore
fair enough, I can agree with that
northpole
+6  A: 

Why not just use Reporting Services? It's free and easy to integrate with both WebForms and WinForms apps. Supports export to PDF, Excel, etc.

Nissan Fan
+1 for easiest/cleanest solution. Only question is whether or not it's worth is to re-engineer the report that's already working.
Babak Naffas
I had thought about this option, but i wanted the reports to be versatile and I have more control over what's displayed using c# code-behind. I use one layout for like 13 different reports. It changes based upon the parameter I pass to it and I was on a low time schedule
ferronrsmith
+1  A: 

You could try implementing a print stylesheet (you'll find many examples Googling the term), but that can be laborious if you're not familiar with css.

If you're checking out pdf solutions, I've used iTextSharp to create pdfs. It's relatively easy, open source and mature and used by many corporations.

Steve
I tried this method and it worked perfectly!!! thanks man
ferronrsmith
Sure. Glad I could help.
Steve