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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jamaussCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
Redefining Cyber Security w/ AI & Machine Learning

The implications of AI and machine learning in cyber security are massive and constantly growing, creating both efficiencies and new challenges across the board. Join our webinar on Sept. 21st to learn more about leveraging AI and machine learning to protect your business.

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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Hardware

From novice to tech pro — start learning today.