944,110 Members | Top Members by Rank

Ad:
May 9th, 2007
0

Data Report in vb 6.0

Expand 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....
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Vish_All is offline Offline
2 posts
since May 2007
May 11th, 2007
0

Re: Data Report in vb 6.0

Click to Expand / Collapse  Quote originally posted by Vish_All ...
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.

Quote ...
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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
cmrhema is offline Offline
10 posts
since May 2007
Jul 31st, 2007
0

Re: Data Report in vb 6.0

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
kalpanamasare is offline Offline
3 posts
since Jul 2007
Jul 31st, 2007
0

Re: Data Report in vb 6.0

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.
Reputation Points: 11
Solved Threads: 49
Posting Whiz
jireh is offline Offline
316 posts
since Jul 2007
Jul 31st, 2007
0

Re: Data Report in vb 6.0

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, 2033 views)
Reputation Points: 11
Solved Threads: 49
Posting Whiz
jireh is offline Offline
316 posts
since Jul 2007
Aug 1st, 2007
0

Re: Data Report in vb 6.0

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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
kalpanamasare is offline Offline
3 posts
since Jul 2007
Aug 1st, 2007
0

Re: Data Report in vb 6.0

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.
Reputation Points: 11
Solved Threads: 49
Posting Whiz
jireh is offline Offline
316 posts
since Jul 2007
Mar 12th, 2008
0

Re: Data Report in vb 6.0

How to add group header and footer in VB data reports?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Dinushi is offline Offline
3 posts
since Mar 2008
Sep 9th, 2008
-1

Re: Data Report in vb 6.0

How to generate Data report in VB 6.0
Please send me the samples
Reputation Points: 10
Solved Threads: 0
Newbie Poster
zeetech is offline Offline
1 posts
since Sep 2008
Feb 4th, 2010
0
Re: Data Report in vb 6.0
i want to know to print Data Report as per date mention
i.e
from 1-4-09 to 1-5-09 like this
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rathisamal is offline Offline
1 posts
since Feb 2010

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
This thread is currently closed and is not accepting any new replies.
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: dijkstra's algorithm for network analyst in esri ARCGIS
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: need help calling dll from vb 6... i get a 453 error and grrr....





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC