3 Replies Latest reply on Oct 21, 2015 11:01 AM by erolst

    Summary and GetSummary fields issues in reports

    renti

      Hello,

       

      I have 2 reports in my application that share the same problem when trying to obtain the totals:

       

      Stock report:

      i want to show these 3 fields:

      stock value for each product = stock x product price --> no problem

      stock quantity for each product categorie --> summary stock --> no problem

      stock value for each product categorie --> not working

      total stock value (all products in the warehouse) --> not working

       

      i face the same problem for the employees payrolls:

      payroll for each employee = hours x hourly wage --> no problem

      monthly hours for all the employees  --> summary hours--> no problem

      total monthly wages (sum of the wages for all the employees) --> not working

       

      i´ve been trying with GetSummary fields but not luck untill now. i hope someone could help me out

        • 1. Re: Summary and GetSummary fields issues in reports
          erolst

          renti wrote:

          Stock report:

          i want to show these 3 fields:

          stock value for each product = stock x product price --> no problem

          stock quantity for each product categorie --> summary stock --> no problem

          stock value for each product categorie --> not working

          total stock value (all products in the warehouse) --> not working

           

          You just need one single TotalOf summary field for stock value.

           

          Add a sub-summary part sorted by Category, and place the summary field there to see the total value per category; place this field also into the footer or header to get the total value for all records.**

           

          The crucial part here is to sort the found set by category, so the summary field in the sub-summary part by category shows the correct results.

           

          **For a summary field, “All records” means the found set; so make sure that you indeed show all records in your report.

          • 2. Re: Summary and GetSummary fields issues in reports
            renti

            Hello Erolst,

             

             

             

            the problem i think it´s in the stock field, because i can´t just calculate it using (itemIN - itemOUT),  i have to calculate it using:

            GetSummary (s_Entrada_articulo; c_articulo) - GetSummary (s_Salida_articulo;  c_articulo), since each line in my report is a subsummary part (i´m not using the body part).

             

            when i multiply this field for by the product price in each line, it works fine.

             

            The problem is to get the totals for the stock value of a categorie or the Grand Summary stock value. At the moment i have to export to excel to get the totals....

            • 3. Re: Summary and GetSummary fields issues in reports
              erolst

              renti wrote:

              the problem i think it´s in the stock field, because i can´t just calculate it using (itemIN - itemOUT),  i have to calculate it using:

              GetSummary (s_Entrada_articulo; c_articulo) - GetSummary (s_Salida_articulo;  c_articulo), since each line in my report is a subsummary part (i´m not using the body part).

               

              Obviously, I don't know your database, but you can try to

               

              • create a balance calc field based on the direct (non summarized) values (I guess, Entrada_articulo - Salida_articulo), then

              • create a summary field for that calc field

               

              Or use this expression for the grand total:

               

              GetSummary (s_Entrada_articulo ; s_Entrada_articulo ) -

              GetSummary (s_Salida_articulo ; s_Salida_articulo )

               

              Using the summary field itself as the break field returns the grand total.