• Report Calculation Problem (2000)

    Author
    Topic
    #358040

    I’ve generally found the best way to handle summing fields is to do it in the query. So, create a field in query with an expression that does the match you want, then name it TotalCommission. Put a textbox in your report footer (and/or group footer) with control source of:
    =sum(TotalCommission)

    As for landscape problem. while in Design mode, trying setting paper size, then save design.

    Viewing 2 reply threads
    Author
    Replies
    • #533246

      You cannot calculate using a calculated field. If you want to total that field, then you have to do the calculation in the underlying query. There is no alternative except using a DSum and repeating the underlying calculation in that. It would be easier to just change the query.

    • #533257

      At the risk of getting warts there is a way. If you duplicate the calculated control, give it another name like txtTotalCommission set it to Visible=NO and RunningSum-OverAll, then refer to it in the Footer, i.e. create yet another text box in the footer like – txtCommTotal with control source =[txtTotalCommission], that should do it.

    • #533277

      >>However, I don’t know if you noticed or not but the comRate field uses an IIF statement <<

      No, I didn't notice. I must confess that some of us see so many messages we sometimes skim them, and may miss certain factors.

      I'd still recommend trying to get it in the query. However, you can manually add the total from any control in the detail section to an unbound control you have in a footer. Just put the appropriate code in the detail section's OnPrint event. HOWEVER!!!!! This is not recommended. For one thing, it produces unpredictable results if you preview the report.

    Viewing 2 reply threads
    Reply To: Report Calculation Problem (2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: