how to find grand total in access report for a field with expression

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shalskedar
    New Member
    • Sep 2009
    • 66

    #1

    how to find grand total in access report for a field with expression

    In the Report 1 of the fields contain expression.When i m trying to find the grandtotal for this field it gives me error..

    For ex- The field expression is Format([GstPercentage],"0.00") to limit the field value upto 2 decimal but with this expression i can't find the grandtotal.So wanted to know how can i find grand total for this field.
  • MikeTheBike
    Recognized Expert Contributor
    • Jun 2007
    • 640

    #2
    Hi

    Don't format the field in the query, set the formatting of the report's control (Textbox?) that displays the result(s). You should then be able the get the totals and any sub-totals and then format them also.

    HTH


    MTB

    Comment

    • ADezii
      Recognized Expert Expert
      • Apr 2006
      • 8834

      #3
      1. Place a Text Box in the Report's Footer Section and set its Control Source as such:
        Code:
        =Sum([GstPercentage])
      2. Set the Format Property of the Text Box to whatever you like.

      Comment

      • shalskedar
        New Member
        • Sep 2009
        • 66

        #4
        Problem here is that if i do it in this way as =Sum([GstPercentage]) in the Report's Footer Section ,the grandtotal appears as 65.095 in Access which is may b a rounded value(may b it takes 4 decimal places)....but when i export this report to excel my total is 65.093....shows ad difference of 0.002

        So how to limit the decimal places in Access itself so that the grandtotal is same as that of excel...

        Comment

        • ADezii
          Recognized Expert Expert
          • Apr 2006
          • 8834

          #5
          Try:
          Code:
          =FormatNumber(Sum([GstPercentage]),2)

          Comment

          • shalskedar
            New Member
            • Sep 2009
            • 66

            #6
            Sorry!!I tried it out but not working still

            Comment

            • ADezii
              Recognized Expert Expert
              • Apr 2006
              • 8834

              #7
              Can you Attach the Database or a Subset of it?

              Comment

              Working...