Data Reports: using the Function control

Hi!

I am designing a report Using the Data Reports in VB 6.0.
I have 2 fields called Fees and Deposit respectively.

What i want to do is add the fields Fees at the end of the
report (using the Function control via Sum) and do the
same with also deposit.

Then I want to add the Fees total and the Deposit total
to get what I have called Final total.

Here's an example,

  Counter       Fees           Deposit

   1            1000             2000
   2            1000             2000
   3            1000             2000
               ________         _______
   Fees total  3000                6000 Deposit total
               ________         _______


   Final total: 3000+ 6000 = 9000

The problem I encounter is that you can't insert a Function
control in the Page Footer of the Data Report Designer.
You can insert it inside the Report Footer but than how do
I add the Fees total and Deposit total.

Any help please,

Mehul

c_mehul@hotmail.com
melvin_d@hotmail.com


meluAsked:
Who is Participating?
 
jamaussConnect With a Mentor Commented:
Mehul,

  If you go into your Data Environment and go to the Command you created, right-click and go to Properties. Then click the aggregates tab, you can define a grand total or total from fields within the database you're working with. After that, the total "query" will appear under the command and you can drag that onto the footer section of the data report designer.
0
 
meluAuthor Commented:
Thanks for your reply, BUT

I have tried what you do with No success. Doing so creates another field (total "query", as you point out) - but I can't not put that in my Data Report (i.e in the footer section). Why??

c_mehul@hotmail.com
Mehul
0
 
jamaussCommented:
You can't put that in the footer section because it can only go into the details section or group footer section. Try Right-clicking in the details section and select "add group footer/header" and then drag the total field into that section and see if that works for you.
0
SMB Security Just Got a Layer Stronger

WatchGuard acquires Percipient Networks to extend protection to the DNS layer, further increasing the value of Total Security Suite.  Learn more about what this means for you and how you can improve your security with WatchGuard today!

 
meluAuthor Commented:
Happy Millinimum,

Well it doesn't work. I did exactly as you suggest.

Has it got to do with the way i create my query??
Here is how i create the query called Subscription.


    Dim qdf As QueryDef
    Dim strSub As String
   
    dbs.QueryDefs.Delete "Subscription"       ' delete old query
   
   ' Create the query using DAO
   ' Use Text2 as the user input      

    strSub = "SELECT Surname, Date_Paid, Fees_paid From New_Member"
    strSub = strSub & " WHERE Month(Date_Paid) = '" & Month(CDate(Trim(Text2.Text))) & "'"
   
    Set qdf = dbs.CreateQueryDef("Subscription", strSub)
   
    If DataEnvironment1.rsSubscription1.State = 0 Then
        DataEnvironment1.rsSubscription1.Open
    End If
    DataEnvironment1.rsSubscription1.Requery
   
    Subscription_DR.Show            ' Open the data report


Any suggestions...... as what's wrong???


Thanks,
Mehul
c_mehul@hotmail.com
0
 
jamaussCommented:
Sorry, I'm not very good at Data reports in VB. However, I can suggest a solution for you. You can find it at DataDynamics.com. Look for something called the Active Reports from DataDynamics. That's what I found and it better than even Crystal Reports.

Jason
0
 
meluAuthor Commented:
Thanks for trying,

so I 'll give you the 50 points

Mehul
0
All Courses

From novice to tech pro — start learning today.