Wrox Programmer Forums
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 29th, 2007, 02:07 AM
Registered User
 
Join Date: Apr 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default printing reports

I need to know how to create reports from DB data and print them from vb express. I don't have crystal reports and cannot afford it. I do have MS office, but not sure how to use it to print from the program. please help.

 
Old April 30th, 2007, 12:34 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Well, if you want to take the time to do it, you can really make nice reports by opening a refernece to Word, and writing code that "types" a document, alternately using built in strings of text in your code and dynamic information from the DB. You have access to virtually evrything Word can do.

When I want to do something like this, I open Word, start recording a macro and type that which I want the results to look like, then take the recorded VBA in Word and adapt it to the external VB environment I need it to run within.

Look into GetObject() and CreateObject() for starting and using Word.
 
Old May 20th, 2007, 12:07 AM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 221
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I had a same scanerio before.... in time of VB6 and CR...

So I used MS-ACCESS automation objects.. and exported the data to .snp file snapshot viewer and call this .snp file in the Snap Shot Active X control in VB, and its looks as the same as CR reports...

But to consider... it has limitations and bit more complex line of codes. For Sure, there is a way...

With Regards,
Raghavendra Mudugal





Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing Crystal Reports deontae45 BOOK: Professional Crystal Reports for VS.NET 0 June 6th, 2007 09:35 AM
Printing Reports From Forms Brendan Bartley Access 1 June 30th, 2006 07:35 AM
printing and alignment in reports collie BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 1 April 14th, 2005 08:09 AM
capturing printing settings when printing reports nikolaosk Access VBA 0 February 8th, 2005 04:14 AM
Printing reports tucker Access VBA 1 February 9th, 2004 01:04 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.