| | |
Data Report in vb 6.0
![]() |
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....
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....
•
•
Join Date: May 2007
Posts: 10
Reputation:
Solved Threads: 0
•
•
•
•
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....
•
•
•
•
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.
Post your own problem not here that looks like a reply... sorry no offense meant.
A conclusion is the place where you got tired of thinking. http://www.martin2k.co.uk/forums/index.php?showforum=4
http://www.a1vbcode.com/a1vbcode/vbforums/Forum3-1.aspx
http://www.developerfusion.co.uk/for...orum&ForumID=4
try this and edit the code and fields that will suit to your program, unzipped it in winrar
A conclusion is the place where you got tired of thinking. http://www.martin2k.co.uk/forums/index.php?showforum=4
http://www.a1vbcode.com/a1vbcode/vbforums/Forum3-1.aspx
http://www.developerfusion.co.uk/for...orum&ForumID=4
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.
A conclusion is the place where you got tired of thinking. http://www.martin2k.co.uk/forums/index.php?showforum=4
http://www.a1vbcode.com/a1vbcode/vbforums/Forum3-1.aspx
http://www.developerfusion.co.uk/for...orum&ForumID=4
![]() |
Similar Threads
- help me pls~~ data report data section does not match data source (Visual Basic 4 / 5 / 6)
- about data report (Visual Basic 4 / 5 / 6)
- Printing Data Report Directly in vb.net (VB.NET)
- Data report... (Visual Basic 4 / 5 / 6)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Problem in showing output of Data report.
- Next Thread: creating word document using vb codes
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





