By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,988 Members | 1,493 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,988 IT Pros & Developers. It's quick & easy.

Data Reports

ANTY90
P: 14
I want to print the bill report from within VB6.0 instead of Word. How to print any info using data reports?
Awaiting your reply.
Dec 30 '07 #1
Share this Question
Share on Google+
4 Replies


lotus18
100+
P: 866
Hi

Select Project > Add Data Report, then that's it
BTW, are you using DAO or ADO?

Rey Sean
Dec 31 '07 #2

Ali Rizwan
100+
P: 927
I want to print the bill report from within VB6.0 instead of Word. How to print any info using data reports?
Awaiting your reply.
Add a data report as lotus says.
Now add rptrlabels and rptrtextboxes.
You need a data environment to be add and connect it with your database connect your data report to data environment and connect labels and textboxes with commands added in data environment.
Now when you run the data report the bill was build automatically.

If you need any more help in databases of such type you can contact me using yahoo. You can find my id from my profile.

Regards

>> ALI <<
Dec 31 '07 #3

ANTY90
P: 14
but how to connect a database to a data environment
it would be of great help if u give an example with a little coding
Jan 1 '08 #4

werks
100+
P: 220
Happy New Year..

Try this..

frmPreview

Expand|Select|Wrap|Line Numbers
  1. Private Sub chPreview_Click()
  2.      rptBookreport.Show
  3. End Sub
Now add this code to your Datareport..

rptBookReport

Expand|Select|Wrap|Line Numbers
  1. Option Explicit
  2. Dim adoReport As New ADODB.Recordset
  3. Private Sub DataReport_Initialize()
  4.      Set adoReport = New ADODB.Recordset
  5.      adoReport.Open "SELECT * FROM tblBooks", CoNN,  adOpenStatic, adLockReadOnly
  6.      Set rptBookreport.DataSource = adoReport
  7. End Sub
  8.  
  9. Private Sub DataReport_Terminate()
  10.      adoReport.Close
  11.      Set adoReport = Nothing
  12. End Sub
Hope this help you..
Jan 1 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.