Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 451
  • Last Modified:

Printing in VB6

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
hllim
Asked:
hllim
1 Solution
 
_agj_Commented:
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
 
ceroCommented:
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
 
hllimAuthor Commented:
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
 
SethiCommented:
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now