Solved

Printing in VB6

Posted on 2003-11-02
4
445 Views
Last Modified: 2010-05-01
Hello all,

I want to generate report by using VB6, what can I do? I know there is datareport available, but due to my complicated SQL Query, I don't really like the datareport, it is not that flexible to me.

Moreover, may I know how I can print the report from VB? Any built in function that I can use?

Thx!
0
Comment
Question by:hllim
4 Comments
 
LVL 7

Expert Comment

by:_agj_
ID: 9669469
hmm....one way out is to get Crystal Reports, install it and use the same.

Second, you could include  a reference to MS Access Library.

There is a report object/class that it provide.

Declare something of report type and use its properties like DataSource etc to load it.

One can do a report1.print to print the report.
0
 
LVL 2

Expert Comment

by:cero
ID: 9673686
Hi,
another way is to construct a form, think of it like if it were the report, put grids, whatever control you nedd and then use Printform method of form. Form should have background color set to blank.

This method works for me for small and complicated reports, data relacionated.

another way is to use the printer object, but is a lot of work.

regards,

cero.
0
 

Author Comment

by:hllim
ID: 9676311
Thx for the feedback.

However my report is not a simple report. PrintForm method couldn't help to print as user needs to scroll down to view the whole report.

I tried the datareport and data environment. I have created one parents command object and 2 child command objects in my data environment. I could drag drop data items from parents command object and one of its child command object to the datareport details section. However I couldn't do so for the second child command object data item. Anyone could please advise on this?

Thx again!
0
 
LVL 18

Accepted Solution

by:
Sethi earned 125 total points
ID: 9685138
There are not many options with you. I had the same question one year back but was left with no options but to use some professional reporting tool. I have always hated Crystal Reports so was looking for better options. I tried creating reports in HTML and then calling then in Internet control in VB. This way you can create great reports but you would not get flexibility in printing the reports. Then I tried Access reports. The problem with this reporting is that the client should have Access installed on the machine for these reports to work. Now I am using ComponentOne VSView reporting tools. They are excellent. The printing capabilities are mindboggling and the ease involved in creating the reports is very high. I would recommend you these reports. If you looking for free options or options where you dont have to spend much, dont waste time. I did a lot of R&D on that.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now