|
-
Jun 14th, 2007, 11:03 AM
#1
Thread Starter
New Member
Advanced Printing with Native VB Code
Hello all, I would like to get some general ideas on this ...
I currently have an application that relies on Excel for printing. The app itself rather straightforward: the user (typically a financial professional person) enters a handful of data values, and app produces a financial planning report (about 5 pages) for a prospective client. Although the app was originally based on an Excel model, the ONLY thing Excel is used for now is to produce the report (the values computed in the program are dumped into Excel cells, no XL formulas are used).
So why use Excel at all? Well, without it, an alternative method of producing the report would be needed. At present, this app does not use a database, so that would make Crystal Reports and Access impractical for this. MS-Word might be viable. However, the report was already designed in Excel, so why re-invent the wheel? The answer is, if at all possible, I would like to produce the report without relying on an "outside" application. That leaves the native VB printing methods, which I know would require gobs of code and is an area which I have little expertise, but which would have the benefits of (a) not requiring the user to have an outside program and (b) not requiring the app to use automation code and the headaches that can sometimes cause.
Let me briefly describe what the report entails:
The cover page is the most complex from printing standpoint, as it consists of a background graphic that takes up the entire page, and then text is overlaid on top of it (consists of the agent's name, prospect's name, address info, copyright info, etc.) in various fonts with various sizes. In the Excel solution, this accomplished by embedding a picture in the worksheet, then overlaying a textbox from the "Shapes" collection (this type of textbox supports a transparent background and mixed font types/sizes).
The second page is the easiest, as it is a text-only "synopsis" in Times New Roman font.
The remaining pages consist of columns of numeric data, with borders, some with shaded or colored cells, etc., headings, and page footers (typical "Excel stuff").
Currently, the app is working well using Excel automation and report looks sharp - but I want to explore alternatives for the reasons described above.
So the question is, what would it take to produce something like this using native VB printing methods? I can imagine advanced use of the picturebox, setting points, graphic methods for drawing boxes, etc. (all the stuff I have avoided all these years 
I appreciate anyone's input on this, and also, if anyone is an expert in this area and would want to take on something like this, let me know ...
Thanks for listening ...
Last edited by VBInquirer; Jun 14th, 2007 at 11:09 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|