-
August 3rd, 2011, 02:33 PM
#1
How sum a data report column
Dear friends,
Your valuable advice helps me great. I am totally new in VB6 programming. I create a Data Report without Data Environment. The codes are as follows
Code:
private Sub CmdPrint_Click()
CON.Open ("provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\db1.mdb")
RS.Open "select * from table1", CON, adOpenDynamic, adLockOptimistic
Set RPT2.DataSource = RS
RPT2.Sections("section1").Controls("Text1").DataField = "TYPE"
RPT2.Sections("section1").Controls("Text2").DataField = "part_no"
RPT2.Sections("section1").Controls("Text3").DataField = "product_name"
RPT2.Sections("section1").Controls("Text4").DataField = "mrp"
RPT2.Sections("section1").Controls("Text5").DataField = "QTY"
RPT2.Sections("section1").Controls("Text6").DataField = "TOTAL"
RPT2.WindowState = 2
RPT2.Show 1
RS.Close
CON.Close
End Sub
Now I want to print the Total sum of the Total field at the bottom of the report. So, friends what is the code for it?
Please friends help me in this regard.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|