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....

Recommended Answers

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... …

Jump to Post

try this and edit the code and fields that will suit to your program, unzipped it in winrar

Jump to Post

goto www.hippofile.com then download the winrar then install, that will open the zip file I attached

Jump to Post

All 9 Replies

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

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

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.

try this and edit the code and fields that will suit to your program, unzipped it in winrar

HI,
Thanks for reply.Attached file is in .RARformat. Can u plz tell me how to open it.

Thanks & regards
kalpana

goto www.hippofile.com then download the winrar then install, that will open the zip file I attached

How to add group header and footer in VB data reports?

How to generate Data report in VB 6.0
Please send me the samples

i want to know to print Data Report as per date mention
i.e
from 1-4-09 to 1-5-09 like this

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.