Document Layout for Reports sent to End-Users
I'm pretty new to C# and .NET - I'm in the process of redesigning an outdated Excel/VBA-based quoting & inventory system. Most of the UI and backend is built already.
The problem is that I'm struggling to figure out how best to create and print the documents that will be sent to clients - namely the quotations themselves.
So, my question is thus: what would you recommend as something easy for a newbie to get to grips with to create documents that look something like the one I've included here? Our budget is practically zero (just to make things harder!) I've tried a few free controls floating around on the net but none of them seem to be particularly easy to use (no wysiwyg editor) or they crash (even embedding an excel sheet into the form seems to crash the IDE)
Note that these documents can sometimes spill over to 2 pages or more depending on the hire in question, and we want 'neat' page breaks (i.e. with a footer at the bottom, not looking like it's just been chopped off).
The documents will be output to either a PDF, a printer, or in rare cases HTML (although it's not the end of the world if HTML isn't possible)
Incidentally due to the aforementioned lack of budget, I'm on C# Express 2010, so anything that comes bundled with full VS is probably not going to work unless it's suppor开发者_StackOverflow中文版ted by Express.
EDIT: Can't post images as a newbie...basically it's a document with a watermark, address at top left corner, some details in the middle at the top, logo top right, then under that a full-width table of items and associated prices. Then at the bottom a bit of sales spiel, a signature, and a footer. So it's kinda like a 3 x grid with a footer, with a grid nested inside that for the prices etc. Formatted nicely (coloured text in a nice font, rounded corners for headings, nicely spaced out etc etc...)
You don't say if you're building a desktop or web based app, but I'll assume that it's a web app.
One option you might want to consider is saving the parts of your template as an .rtf file, and then assembling the final document based on the different parts. rtf is a text-based format, so you can do string substitutions, etc on it.
I do this kind of work a couple of times per year, and I use Crystal Reports with a C# host. I had a question about controlling parameters and creating multiple files that might be helpful:
Crystal Reports "File Break"
Creating the actual Crystal Report was pretty simple, though we don't generally do anything particularly fancy. It ain't free, but it's a good tool and it will get this job done.
I have found success using SSRS(SQL Server Reporting Services) reports, especially if the data is being stored in a database. You can still use the reports and display/print them from the VS Report viewer in Winforms/WPF. Although I am not sure about designer support in VS Express.
精彩评论