I'd like to use data from a form to fill in the blanks for another, standard form to be printed at the user's computer. I'm not sure where to start on the printing part. I can make a form, but I've never taken form data and used it to populate a different form in VB. Plus, the filled-in form needs to be generated as a PDF so they may save the document.
It would be great if someone could put me on a general path to get me going in the right direction. Thanks!
BTW, I'm using VWD express and SQL Server Developer 2005.
I don't know what you mean by "use data from a form to fill in the blanks for another". Can you please explain?
----------
www.madskristensen.dk/blog/
If it needs to be generated as PDF, you'll need a third party component to accomplish that, and you'll basically have to create your print document frm scratch.
Here's an open source PDF generator:
http://itextsharp.sourceforge.net/
NC...
tage a look at the reportviewer control in local mode.If you are using the express edition you will need to download it at www.gotreportviewer.com
The UI will look nothing like the completed, printable form, so the data from the first form will be used to fill in the blanks for the second. The form is printable so that they may sign it before mailing.
Hmm, maybe a pdf isn't the way to go, because it looks like the programming necessary to make a document with the formatting, boxes, and styles is over my capabilities. If I have a Word template of the document (I do, but not one with fields for data entry, strictly print and fill out yourself), could I programmatically fill in the blanks using my application and have it print via Word?
I need to manipulate and then store the data in a db. That is why I haven't just created a Word template with blank fields to be filled in.
The only way to print in a web page is to just print the page itself:
<INPUT type="button" value="Print" onclick="JavaScript:window.print();">
or use a third party tool (Crystal Reports, AR Reports, etc).
I can tell you from experience, that PDF is the way to go. There's a full tutorial on the site that I gave you the link for, if that's any help.
NC...
there are 2 basic ways to do this - either construct a web page that pulls data from db and displays it in labels on a webpage - then the client chooses print from the browser command ( or javascripted button)
or youcreate a report.
IMO reportviewer is the easiest way to do this. You would create a new report - add labels, images, etc.. -this will be the form that is printed, so you will lay it out the way you want the finished product to look like.
You would than drag a reportviewer control onto a new page - set the properites to point to the report you created. Populate with data and bam ! - you got a printable form as is OR use the built-in export to PDF feature to have it rendered into a PDF
gotreportviewer.com is a good reference for most of this - but you need to read about the reportviewer at a couple of different places ( or at least i needed to ) in order to get comfortable with it.
I'll give it (the PDF link) a more in-depth look this afternoon. If I switched to a full VS platform, would a windows form app be more appropriate for this task? I don't have to use a web page, and would have no problem distributing it to the users as a package.
Thanks!
kbdaemon
I believe it's the same since it's the same control - reportviewer
Once you create the .rdlc ( report definition ) it's a piece of cake ( for simple reports, complex reports with drillthrough etc...might take a bit of work from what I've read )
0 comments:
Post a Comment