Data Report in vb 6.0

Reply

Join Date: May 2007
Posts: 2
Reputation: Vish_All is an unknown quantity at this point 
Solved Threads: 0
Vish_All's Avatar
Vish_All Vish_All is offline Offline
Newbie Poster

Data Report in vb 6.0

 
0
  #1
May 9th, 2007
hi all,
I have create a database application in vb 6.0
i need to retrive some reports using data report (not Crystal) such as date wise report or customer wise report.
The steps i fallowed are:
1. retrived text boxes in data report
2. for date wise report , created a form providing calendar to choose date.
3. on command button the code is :

With DataReport1

Set .DataSource = Nothing
.DataMember = ""
Set .DataSource = RS.DataSource


With .Sections("Section1").Controls

For i = 1 To .Count

If TypeOf .Item(i) Is RptTextBox Then
.Item(i).DataMember = ""
.Item(i).DataField = RS.Fields(i).Name
End If
Next i
End With

4. the code executed apporximately as per date report.
Now the problem is about Customer report.
I need all transactions of the same customer with
Customer name and account no on header
and other transaction contents on detail section.
provicde : the data base fields are
custname,custno,date,credit,debit,balance .....

plz help....
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 10
Reputation: cmrhema is an unknown quantity at this point 
Solved Threads: 0
cmrhema cmrhema is offline Offline
Newbie Poster

Re: Data Report in vb 6.0

 
0
  #2
May 11th, 2007
Originally Posted by Vish_All View Post
hi all,
I have create a database application in vb 6.0
i need to retrive some reports using data report (not Crystal) such as date wise report or customer wise report.
The steps i fallowed are:
1. retrived text boxes in data report
2. for date wise report , created a form providing calendar to choose date.
3. on command button the code is :

With DataReport1

Set .DataSource = Nothing
.DataMember = ""
Set .DataSource = RS.DataSource

With .Sections("Section1").Controls

For i = 1 To .Count
If TypeOf .Item(i) Is RptTextBox Then
.Item(i).DataMember = ""
.Item(i).DataField = RS.Fields(i).Name
End If
Next i
End With
4. the code executed apporximately as per date report.
Now the problem is about Customer report.
I need all transactions of the same customer with
Customer name and account no on header
and other transaction contents on detail section.
provicde : the data base fields are
custname,custno,date,credit,debit,balance .....

plz help....
Check out the following sample code.

Dim Mycon As New ADODB.Connection
Dim M1 As New ADODB.Recordset
Dim M2 As New ADODB.Recordset
Dim S1 As String
S1 = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & _
App.Path & "check.mdb"

Mycon.Open S1
M2.Open "select customer_id,orderno,delivery_date,order_date,dress_name " & _
"from dress_details where delivery_date>=#" & DTPicker1.Value & "# and delivery_date <=# " & DTPicker2.Value & "# order by delivery_date", _
Mycon, adOpenDynamic, adLockOptimistic
'I have used DTPicker control for dates. So change it to your table and details accordingly.
Set DataReport1.DataSource = M2

With DataReport1

.Sections("Section1").Controls

For i = 1 To .Count
If TypeOf .Item(i) Is RptTextBox Then
.Item(i).DataMember = ""
.Item(i).DataField = M2.Fields(i).Name
End If
Next i
End With


DataReport1.WindowState = vbMaximized
DataReport1.Show vbModal
M2.Close
Mycon.Close
Last edited by cmrhema; May 11th, 2007 at 12:05 pm.
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 3
Reputation: kalpanamasare is an unknown quantity at this point 
Solved Threads: 0
kalpanamasare kalpanamasare is offline Offline
Newbie Poster

Re: Data Report in vb 6.0

 
0
  #3
Jul 31st, 2007
HI,
i hv .dsr reports which r created in crystal report 8 version.Now in my system i m hving version 11. I m able to open that report. can u plz give me solution.

Thanks
kalpana
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 300
Reputation: jireh is an unknown quantity at this point 
Solved Threads: 42
jireh's Avatar
jireh jireh is offline Offline
Posting Whiz

Re: Data Report in vb 6.0

 
0
  #4
Jul 31st, 2007
Originally Posted by kalpanamasare View Post
HI,
i hv .dsr reports which r created in crystal report 8 version.Now in my system i m hving version 11. I m able to open that report. can u plz give me solution.

Thanks
kalpana
Post your own problem not here that looks like a reply... sorry no offense meant.
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 300
Reputation: jireh is an unknown quantity at this point 
Solved Threads: 42
jireh's Avatar
jireh jireh is offline Offline
Posting Whiz

Re: Data Report in vb 6.0

 
0
  #5
Jul 31st, 2007
try this and edit the code and fields that will suit to your program, unzipped it in winrar
Attached Files
File Type: zip aaa.ZIP (44.2 KB, 175 views)
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 3
Reputation: kalpanamasare is an unknown quantity at this point 
Solved Threads: 0
kalpanamasare kalpanamasare is offline Offline
Newbie Poster

Re: Data Report in vb 6.0

 
0
  #6
Aug 1st, 2007
HI,
Thanks for reply.Attached file is in .RARformat. Can u plz tell me how to open it.

Thanks & regards
kalpana
Last edited by kalpanamasare; Aug 1st, 2007 at 1:39 am.
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 300
Reputation: jireh is an unknown quantity at this point 
Solved Threads: 42
jireh's Avatar
jireh jireh is offline Offline
Posting Whiz

Re: Data Report in vb 6.0

 
0
  #7
Aug 1st, 2007
goto www.hippofile.com then download the winrar then install, that will open the zip file I attached
Last edited by jireh; Aug 1st, 2007 at 11:14 am.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 3
Reputation: Dinushi is an unknown quantity at this point 
Solved Threads: 0
Dinushi Dinushi is offline Offline
Newbie Poster

Re: Data Report in vb 6.0

 
0
  #8
Mar 12th, 2008
How to add group header and footer in VB data reports?
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 1
Reputation: zeetech is an unknown quantity at this point 
Solved Threads: 0
zeetech zeetech is offline Offline
Newbie Poster

Re: Data Report in vb 6.0

 
0
  #9
Sep 9th, 2008
How to generate Data report in VB 6.0
Please send me the samples
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC