Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Printing in VB6

Posted on 2003-11-02
4
Medium Priority
?
450 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 375 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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 process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

718 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