Master Band - Sum of Detail Band by Group and Total

Stimulsoft Reports.NET discussion
AdrianFS
Posts: 16
Joined: Mon Jul 25, 2011 4:36 pm

Master Band - Sum of Detail Band by Group and Total

Post by AdrianFS »

I am finishing my evaluation of Stimulsoft reports and have run into problems trying to get a summary from a detail band in the group footer and footer band of the master. My report is layed out like this:

MasterGroupHeaderBand
MasterDetailBand
MasterGroupFooterBand
MasterFooterBand
DetailBand

I would like to show the result of a Sum on a field in the DetailBand in the MasterDetailBand, MasterGroupFooterBand, and MasterFooterBand. When I use Sum([DetailTable].[Field]) in any of the master footer bands I seem to get a sum of one detail record per master record, rather than all detail records.

Below is a sample report based off the Demo.xml data set that illustrates what I am trying to accomplish.

Thank you very much.

Code: Select all


  
    
    
      
        Connection
        Connection
        C:\Development Tools\Stimulsoft Reports.Net 2011.3 Trial\Bin\Data\Demo.xml
        C:\Development Tools\Stimulsoft Reports.Net 2011.3 Trial\Bin\Data\Demo.xsd
      
    
    
      
        Auto
        
          Rank,System.Double
          Country,System.String
          Year2009,System.Double
          Year2005,System.Double
          Year2000,System.Double
        
        
        Auto
        Connection.Auto
      
      
        Categories
        
          CategoryID,System.Int32
          CategoryName,System.String
          Description,System.String
          Picture,System.Byte[]
        
        
        Categories
        Connection.Categories
      
      
        Countries
        
          CountriesID,System.Int32
          Flag,System.Byte[]
          CountryName,System.String
        
        
        Countries
        Connection.Countries
      
      
        Customers
        
          CustomerID,System.String
          CompanyName,System.String
          ContactName,System.String
          ContactTitle,System.String
          Address,System.String
          City,System.String
          Region,System.String
          PostalCode,System.String
          Country,System.String
          Phone,System.String
          Fax,System.String
        
        
        Customers
        Connection.Customers
      
      
        Employees
        
          EmployeeID,System.Int32
          LastName,System.String
          FirstName,System.String
          Title,System.String
          TitleOfCourtesy,System.String
          BirthDate,System.DateTime
          HireDate,System.DateTime
          Address,System.String
          City,System.String
          Region,System.String
          PostalCode,System.String
          Country,System.String
          HomePhone,System.String
          Extension,System.String
          Photo,System.Byte[]
          Notes,System.String
          ReportsTo,System.Int32
        
        
        Employees
        Connection.Employees
      
      
        GlobalGrowth
        
          Region,System.String
          Year2006,System.Double
          Year2007,System.Double
          Year2008,System.Double
          Year2009,System.Double
        
        
        GlobalGrowth
        Connection.GlobalGrowth
      
      
        Opec
        
          Year,System.Double
          Iran,System.Double
          Iraq,System.Double
          Kuwait,System.Double
          Saudi_x0020_Arabia,System.Double
          UAE,System.Double
          Venezuela,System.Double
          Libya,System.Double
          Nigeria,System.Double
        
        
        Opec
        Connection.Opec
      
      
        Order Details
        
          OrderID,System.Int32
          ProductID,System.Int32
          UnitPrice,System.Decimal
          Quantity,System.Int16
          Discount,System.Single
        
        
        Order Details
        Connection.Order Details
      
      
        Orders
        
          OrderID,System.Int32
          CustomerID,System.String
          EmployeeID,System.Int32
          OrderDate,System.DateTime
          RequiredDate,System.DateTime
          ShippedDate,System.DateTime
          ShipVia,System.Int32
          Freight,System.Decimal
          ShipName,System.String
          ShipAddress,System.String
          ShipCity,System.String
          ShipRegion,System.String
          ShipPostalCode,System.String
          ShipCountry,System.String
        
        
        Orders
        Connection.Orders
      
      
        Products
        
          ProductID,System.Int32
          ProductName,System.String
          SupplierID,System.Int32
          CategoryID,System.Int32
          QuantityPerUnit,System.String
          UnitPrice,System.Decimal
          UnitsInStock,System.Int16
          UnitsOnOrder,System.Int16
          ReorderLevel,System.Int16
          Discontinued,System.Boolean
        
        
        Products
        Connection.Products
      
      
        Shippers
        
          ShipperID,System.Int32
          CompanyName,System.String
          Phone,System.String
        
        
        Shippers
        Connection.Shippers
      
      
        States
        
          Name,System.String
          USPS,System.String
          Population,System.Int32
          Capital,System.String
        
        
        States
        Connection.States
      
      
        Suppliers
        
          SupplierID,System.Int32
          CompanyName,System.String
          ContactName,System.String
          ContactTitle,System.String
          Address,System.String
          City,System.String
          Region,System.String
          PostalCode,System.String
          Country,System.String
          Phone,System.String
          Fax,System.String
          HomePage,System.String
        
        
        Suppliers
        Connection.Suppliers
      
    
    
      
        Orders
        
          OrderID
        
        
        
        Orders
        Orders
        
          OrderID
        
        
      
      
        Order_Details
        
          OrderID
        
        
        
        Order_Details
        Order_Details
        
          OrderID
        
        
      
    
    
    
  
  EngineV2
  
  
  
    
      None;Black;2;Solid;False;4;Black
      Transparent
      
        
          Transparent
          0,0.2,7.72,0.3
          
            
              None;Transparent;1;Solid;False;4;Black
              Transparent
              0,0,2.1,0.2
              
              Arial,12,Bold
              0,0,0,0
              Text1
              
              
              {Orders.CustomerID}
              Black
            
          
          {Orders.CustomerID}
          
          GroupHeaderBand1
          
          
        
        
          Transparent
          
          0,0.9,7.72,0.3
          
            
              None;Transparent;1;Solid;False;4;Black
              Transparent
              1.9,0,1.7,0.2
              
              Arial,12,Bold
              0,0,0,0
              Text2
              
              
              {Orders.OrderID}
              Black
            
            
              None;Transparent;1;Solid;False;4;Black
              Transparent
              5.8,0,1.9,0.2
              
              Arial,12,Bold
              3c99e5c0b69e4358a34a10de9082be81
              0,0,0,0
              Text10
              
              
              {Sum(Order_Details.Quantity)}
              Black
              Expression
            
            
              None;Transparent;1;Solid;False;4;Black
              Transparent
              4.5,0,1.3,0.2
              
              Arial,12,Bold
              9245b1746b074f1d94c1e89d08b03dd6
              0,0,0,0
              Text11
              
              
              Qty for Order ID:
              Black
              Expression
            
          
          
          
          Orders
          
          DataBand1
          
          
          
        
        
          Transparent
          0,1.6,7.72,0.3
          
            
              None;Transparent;1;Solid;False;4;Black
              Transparent
              5.8,0,1.9,0.2
              
              Arial,12,Bold
              f01a2aefdeeb42c399483b6d893c9618
              0,0,0,0
              Text7
              
              
              {Sum(Order_Details.Quantity)}
              Black
              Expression
            
            
              None;Transparent;1;Solid;False;4;Black
              Transparent
              4.1,0,1.7,0.2
              
              Arial,12,Bold
              0,0,0,0
              Text8
              
              
              Qty for Customer ID:
              Black
              Expression
            
          
          
          GroupFooterBand1
          
          
        
        
          Transparent
          0,2.3,7.72,0.3
          
            
              None;Transparent;1;Solid;False;4;Black
              Transparent
              5.8,0,1.9,0.2
              
              Arial,12,Bold
              e970ecbde2e5498296081d077aa7e048
              0,0,0,0
              Text4
              
              
              {Sum(Order_Details.Quantity)}
              Black
              Expression
            
            
              None;Transparent;1;Solid;False;4;Black
              Transparent
              4.9,0,0.9,0.2
              
              Arial,12,Bold
              9ca1d928c7514e95a25815e61e1286eb
              0,0,0,0
              Text9
              
              
              Total Qty:
              Black
              Expression
            
          
          
          FooterBand1
          
          
        
        
          Transparent
          
          True
          0,3,7.72,0.2
          
            
              None;Transparent;1;Solid;False;4;Black
              Transparent
              2.5,0,2,0.2
              
              Arial,12,Bold
              0,0,0,0
              Text6
              
              
              {Order_Details.Quantity}
              Black
            
          
          
          Orders
          Order Details
          
          
          DataBand2
          
          
          
        
        
          Transparent
          0,3.6,7.72,0.2
          
            
              Top;Black;1;Solid;False;4;Black
              Transparent
              2.5,0,1.9,0.2
              
              Arial,12,Bold
              2ac42e1dbe1e4c8aa7596641df2938c2
              0,0,0,0
              Text5
              
              
              {Sum(Order_Details.Quantity)}
              Black
              Expression
            
          
          
          FooterBand2
          
          
        
      
      
      d8885812eb6c4a3fb6f6490853025f5d
      0.39,0.39,0.39,0.39
      Page1
      11
      8.5
      Letter
      
      
        Arial,100
        [50:0:0:0]
      
    
  
  
  
    System.Dll
    System.Drawing.Dll
    System.Windows.Forms.Dll
    System.Data.Dll
    System.Xml.Dll
    Stimulsoft.Controls.Dll
    Stimulsoft.Base.Dll
    Stimulsoft.Report.Dll
  
  Report
  12/14/2011 5:19:36 PM
  12/14/2011 4:48:55 PM
  C:\Development Tools\Stimulsoft Reports.Net 2011.3 Trial\MasterDetailSum.mrt
  ab2cd2d07e364da5aefaab791f7aec95
  Report
  Inches
  2011.3.1200
  using System;
using System.Drawing;
using System.Windows.Forms;
using System.Data;
using Stimulsoft.Controls;
using Stimulsoft.Base.Drawing;
using Stimulsoft.Report;
using Stimulsoft.Report.Dialogs;
using Stimulsoft.Report.Components;

namespace Reports
{
    public class Report : Stimulsoft.Report.StiReport
    {
        public Report()        {
            this.InitializeComponent();
        }

        #region StiReport Designer generated code - do not modify
        #endregion StiReport Designer generated code - do not modify
    }
}

  CSharp
  
AdrianFS
Posts: 16
Joined: Mon Jul 25, 2011 4:36 pm

Master Band - Sum of Detail Band by Group and Total

Post by AdrianFS »

I found the answer in the documentation:
Sum(MasterBand:DetailBand, [DetailTable].[Field])


This will print the correct totals, but when I try and use an expression like this in an event or condition expression I get the following error:

Named argument specifications must appear after all fixed arguments have been specified
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Master Band - Sum of Detail Band by Group and Total

Post by Alex K. »

Hello,

Please try to use the Totals.Sum() function.

Thank you.
AdrianFS
Posts: 16
Joined: Mon Jul 25, 2011 4:36 pm

Master Band - Sum of Detail Band by Group and Total

Post by AdrianFS »

I get the same error when I use Totals.Sum on MasterBand:DetailBand in an event or condition expression.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Master Band - Sum of Detail Band by Group and Total

Post by Alex K. »

Hello,

Please send us your report with test data which reproduces issue for analysis.

Thank you.
AdrianFS
Posts: 16
Joined: Mon Jul 25, 2011 4:36 pm

Master Band - Sum of Detail Band by Group and Total

Post by AdrianFS »

Example report below. There is a condition expression on the summary in the CustomerIDGroupFooterBand to highlight the Sum value field if it is greater than 200. The condition expression is: Totals.Sum(MasterDataBand:DetailDataBand,Order_Details.Quantity) > 200

It causes the error: Named argument specifications must appear after all fixed arguments have been specified

Code: Select all


  
    
    
      
        Connection
        Connection
        C:\Development Tools\Stimulsoft Reports.Net 2011.3 Trial\Bin\Data\Demo.xml
        C:\Development Tools\Stimulsoft Reports.Net 2011.3 Trial\Bin\Data\Demo.xsd
      
    
    
      
        Auto
        
          Rank,System.Double
          Country,System.String
          Year2009,System.Double
          Year2005,System.Double
          Year2000,System.Double
        
        
        Auto
        Connection.Auto
      
      
        Categories
        
          CategoryID,System.Int32
          CategoryName,System.String
          Description,System.String
          Picture,System.Byte[]
        
        
        Categories
        Connection.Categories
      
      
        Countries
        
          CountriesID,System.Int32
          Flag,System.Byte[]
          CountryName,System.String
        
        
        Countries
        Connection.Countries
      
      
        Customers
        
          CustomerID,System.String
          CompanyName,System.String
          ContactName,System.String
          ContactTitle,System.String
          Address,System.String
          City,System.String
          Region,System.String
          PostalCode,System.String
          Country,System.String
          Phone,System.String
          Fax,System.String
        
        
        Customers
        Connection.Customers
      
      
        Employees
        
          EmployeeID,System.Int32
          LastName,System.String
          FirstName,System.String
          Title,System.String
          TitleOfCourtesy,System.String
          BirthDate,System.DateTime
          HireDate,System.DateTime
          Address,System.String
          City,System.String
          Region,System.String
          PostalCode,System.String
          Country,System.String
          HomePhone,System.String
          Extension,System.String
          Photo,System.Byte[]
          Notes,System.String
          ReportsTo,System.Int32
        
        
        Employees
        Connection.Employees
      
      
        GlobalGrowth
        
          Region,System.String
          Year2006,System.Double
          Year2007,System.Double
          Year2008,System.Double
          Year2009,System.Double
        
        
        GlobalGrowth
        Connection.GlobalGrowth
      
      
        Opec
        
          Year,System.Double
          Iran,System.Double
          Iraq,System.Double
          Kuwait,System.Double
          Saudi_x0020_Arabia,System.Double
          UAE,System.Double
          Venezuela,System.Double
          Libya,System.Double
          Nigeria,System.Double
        
        
        Opec
        Connection.Opec
      
      
        Order Details
        
          OrderID,System.Int32
          ProductID,System.Int32
          UnitPrice,System.Decimal
          Quantity,System.Int16
          Discount,System.Single
        
        
        Order Details
        Connection.Order Details
      
      
        Orders
        
          OrderID,System.Int32
          CustomerID,System.String
          EmployeeID,System.Int32
          OrderDate,System.DateTime
          RequiredDate,System.DateTime
          ShippedDate,System.DateTime
          ShipVia,System.Int32
          Freight,System.Decimal
          ShipName,System.String
          ShipAddress,System.String
          ShipCity,System.String
          ShipRegion,System.String
          ShipPostalCode,System.String
          ShipCountry,System.String
        
        
        Orders
        Connection.Orders
      
      
        Products
        
          ProductID,System.Int32
          ProductName,System.String
          SupplierID,System.Int32
          CategoryID,System.Int32
          QuantityPerUnit,System.String
          UnitPrice,System.Decimal
          UnitsInStock,System.Int16
          UnitsOnOrder,System.Int16
          ReorderLevel,System.Int16
          Discontinued,System.Boolean
        
        
        Products
        Connection.Products
      
      
        Shippers
        
          ShipperID,System.Int32
          CompanyName,System.String
          Phone,System.String
        
        
        Shippers
        Connection.Shippers
      
      
        States
        
          Name,System.String
          USPS,System.String
          Population,System.Int32
          Capital,System.String
        
        
        States
        Connection.States
      
      
        Suppliers
        
          SupplierID,System.Int32
          CompanyName,System.String
          ContactName,System.String
          ContactTitle,System.String
          Address,System.String
          City,System.String
          Region,System.String
          PostalCode,System.String
          Country,System.String
          Phone,System.String
          Fax,System.String
          HomePage,System.String
        
        
        Suppliers
        Connection.Suppliers
      
    
    
      
        Orders
        
          OrderID
        
        
        
        Orders
        Orders
        
          OrderID
        
        
      
      
        Order_Details
        
          OrderID
        
        
        
        Order_Details
        Order_Details
        
          OrderID
        
        
      
    
    
    
  
  EngineV2
  
  
  
    
      None;Black;2;Solid;False;4;Black
      Transparent
      
        
          Transparent
          0,0.2,7.72,0.3
          
            
              None;Transparent;1;Solid;False;4;Black
              Transparent
              0,0,2.1,0.2
              
              Arial,12,Bold
              0,0,0,0
              Text1
              
              
              {Orders.CustomerID}
              Black
            
          
          {Orders.CustomerID}
          
          CustomerIDGroupHeaderBand
          
          
        
        
          Transparent
          0,0.9,7.72,0
          
          {Orders.OrderID}
          
          OrderIDGroupHeaderBand
          
          
        
        
          Transparent
          
          0,1.3,7.72,0
          
          
          
          Orders
          
          MasterDataBand
          
          
          
        
        
          Transparent
          0,1.7,7.72,0.2
          
            
              None;Transparent;1;Solid;False;4;Black
              Transparent
              1.9,0,1.7,0.2
              
              Arial,12,Bold
              0,0,0,0
              Text2
              
              
              {Orders.OrderID}
              Black
            
            
              None;Transparent;1;Solid;False;4;Black
              Transparent
              5.8,0,1.9,0.2
              
              Arial,12,Bold
              3c99e5c0b69e4358a34a10de9082be81
              0,0,0,0
              Text10
              
              
              {Sum(MasterDataBand:DetailDataBand,Order_Details.Quantity)}
              Black
              Expression
            
            
              None;Transparent;1;Solid;False;4;Black
              Transparent
              4.5,0,1.3,0.2
              
              Arial,12,Bold
              9245b1746b074f1d94c1e89d08b03dd6
              0,0,0,0
              Text11
              
              
              Qty for Order ID:
              Black
              Expression
            
          
          
          OrderIDGroupFooterBand
          
          
        
        
          Transparent
          0,2.3,7.72,0.3
          
            
              None;Transparent;1;Solid;False;4;Black
              Transparent
              5.8,0,1.9,0.2
              
                _x007B_Totals.Sum_x0028_MasterDataBand:DetailDataBand_x002C_Order_Details.Quantity_x0029__x0020__x003E__x0020_200_x007D_,Red,Transparent,Arial_x002C_8,True,False,,,None
              
              Arial,12,Bold
              f01a2aefdeeb42c399483b6d893c9618
              0,0,0,0
              Text7
              
              
              {Sum(MasterDataBand:DetailDataBand,Order_Details.Quantity)}
              Black
              Expression
            
            
              None;Transparent;1;Solid;False;4;Black
              Transparent
              4.1,0,1.7,0.2
              
              Arial,12,Bold
              0,0,0,0
              Text8
              
              
              Qty for Customer ID:
              Black
              Expression
            
          
          
          CustomerIDGroupFooterBand
          
          
        
        
          Transparent
          0,3,7.72,0.3
          
            
              None;Transparent;1;Solid;False;4;Black
              Transparent
              5.8,0,1.9,0.2
              
              Arial,12,Bold
              e970ecbde2e5498296081d077aa7e048
              0,0,0,0
              Text4
              
              
              {Sum(MasterDataBand:DetailDataBand,Order_Details.Quantity)}
              Black
              Expression
            
            
              None;Transparent;1;Solid;False;4;Black
              Transparent
              4.9,0,0.9,0.2
              
              Arial,12,Bold
              9ca1d928c7514e95a25815e61e1286eb
              0,0,0,0
              Text9
              
              
              Total Qty:
              Black
              Expression
            
          
          
          MasterFooterBand
          
          
        
        
          Transparent
          
          True
          0,3.7,7.72,0
          
          
          Orders
          Order Details
          
          
          DetailDataBand
          
          
          
        
      
      
      d8885812eb6c4a3fb6f6490853025f5d
      0.39,0.39,0.39,0.39
      Page1
      11
      8.5
      Letter
      
      
        Arial,100
        [50:0:0:0]
      
    
  
  
  
    System.Dll
    System.Drawing.Dll
    System.Windows.Forms.Dll
    System.Data.Dll
    System.Xml.Dll
    Stimulsoft.Controls.Dll
    Stimulsoft.Base.Dll
    Stimulsoft.Report.Dll
  
  Report
  12/16/2011 8:16:11 AM
  12/14/2011 4:48:55 PM
  C:\Development Tools\Stimulsoft Reports.Net 2011.3 Trial\MasterDetailSum.mrt
  e3106cc853b44befb02d2adc7a25aae9
  Report
  Inches
  2011.3.1200
  using System;
using System.Drawing;
using System.Windows.Forms;
using System.Data;
using Stimulsoft.Controls;
using Stimulsoft.Base.Drawing;
using Stimulsoft.Report;
using Stimulsoft.Report.Dialogs;
using Stimulsoft.Report.Components;

namespace Reports
{
    public class Report : Stimulsoft.Report.StiReport
    {
        public Report()        {
            this.InitializeComponent();
        }

        #region StiReport Designer generated code - do not modify
        #endregion StiReport Designer generated code - do not modify
    }
}

  CSharp
  
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Master Band - Sum of Detail Band by Group and Total

Post by Alex K. »

Hello,

Please try to change the Text7 component conditions on the following:

Code: Select all

Totals.Sum(DetailDataBand,Order_Details.Quantity) > 200
Thank you.
AdrianFS
Posts: 16
Joined: Mon Jul 25, 2011 4:36 pm

Master Band - Sum of Detail Band by Group and Total

Post by AdrianFS »

I'm afraid that I still can't get Totals.Sum to work. In the example report below I have the following bands:

CustomerIDGroupHeaderBand, Orders.CustomerID
OrderIDGroupHeaderBand, Orders.OrderID
MasterDataBand, Data Source Orders
OrderIDGroupFooterBand
CustomerIDGroupFooterBand
MasterFooterBand

DetailDataBand, Data Source: Order_Details, Master Component: MasterDataBand


In OrderIDGroupFooterBand, CustomerIDGroupFooterBand, and MasterFooterBand the totals display correctly using:
{Sum(MasterDataBand:DetailDataBand,Order_Details.Quantity)}

However, Totals.Sum(DetailDataBand, Order_Details.Quantity) only gives the correct value in the OrderIDGroupFooterBand. When I use it in CustomerIDGroupFooterBand and MasterFooterBand it gives the value from the last OrderID group. In the example report I set a highlight condition on the {Sum(MasterDataBand:DetailDataBand,Order_Details.Quantity)} fields. The highlight condition uses Totals.Sum and only the one in the OrderIDGroupFooterBand is working correctly.

From my understanding I need to use Totals.Sum in order to sum the detail records and use that value in an event or condition. How can I get Totals.Sum to give the correct result for each group?


Thank you very much.

Code: Select all


  
    
    
      
        Connection
        Connection
        C:\Development Tools\Stimulsoft Reports.Net 2011.3 Trial\Bin\Data\Demo.xml
        C:\Development Tools\Stimulsoft Reports.Net 2011.3 Trial\Bin\Data\Demo.xsd
      
    
    
      
        Auto
        
          Rank,System.Double
          Country,System.String
          Year2009,System.Double
          Year2005,System.Double
          Year2000,System.Double
        
        
        Auto
        Connection.Auto
      
      
        Categories
        
          CategoryID,System.Int32
          CategoryName,System.String
          Description,System.String
          Picture,System.Byte[]
        
        
        Categories
        Connection.Categories
      
      
        Countries
        
          CountriesID,System.Int32
          Flag,System.Byte[]
          CountryName,System.String
        
        
        Countries
        Connection.Countries
      
      
        Customers
        
          CustomerID,System.String
          CompanyName,System.String
          ContactName,System.String
          ContactTitle,System.String
          Address,System.String
          City,System.String
          Region,System.String
          PostalCode,System.String
          Country,System.String
          Phone,System.String
          Fax,System.String
        
        
        Customers
        Connection.Customers
      
      
        Employees
        
          EmployeeID,System.Int32
          LastName,System.String
          FirstName,System.String
          Title,System.String
          TitleOfCourtesy,System.String
          BirthDate,System.DateTime
          HireDate,System.DateTime
          Address,System.String
          City,System.String
          Region,System.String
          PostalCode,System.String
          Country,System.String
          HomePhone,System.String
          Extension,System.String
          Photo,System.Byte[]
          Notes,System.String
          ReportsTo,System.Int32
        
        
        Employees
        Connection.Employees
      
      
        GlobalGrowth
        
          Region,System.String
          Year2006,System.Double
          Year2007,System.Double
          Year2008,System.Double
          Year2009,System.Double
        
        
        GlobalGrowth
        Connection.GlobalGrowth
      
      
        Opec
        
          Year,System.Double
          Iran,System.Double
          Iraq,System.Double
          Kuwait,System.Double
          Saudi_x0020_Arabia,System.Double
          UAE,System.Double
          Venezuela,System.Double
          Libya,System.Double
          Nigeria,System.Double
        
        
        Opec
        Connection.Opec
      
      
        Order Details
        
          OrderID,System.Int32
          ProductID,System.Int32
          UnitPrice,System.Decimal
          Quantity,System.Int16
          Discount,System.Single
        
        
        Order Details
        Connection.Order Details
      
      
        Orders
        
          OrderID,System.Int32
          CustomerID,System.String
          EmployeeID,System.Int32
          OrderDate,System.DateTime
          RequiredDate,System.DateTime
          ShippedDate,System.DateTime
          ShipVia,System.Int32
          Freight,System.Decimal
          ShipName,System.String
          ShipAddress,System.String
          ShipCity,System.String
          ShipRegion,System.String
          ShipPostalCode,System.String
          ShipCountry,System.String
        
        
        Orders
        Connection.Orders
      
      
        Products
        
          ProductID,System.Int32
          ProductName,System.String
          SupplierID,System.Int32
          CategoryID,System.Int32
          QuantityPerUnit,System.String
          UnitPrice,System.Decimal
          UnitsInStock,System.Int16
          UnitsOnOrder,System.Int16
          ReorderLevel,System.Int16
          Discontinued,System.Boolean
        
        
        Products
        Connection.Products
      
      
        Shippers
        
          ShipperID,System.Int32
          CompanyName,System.String
          Phone,System.String
        
        
        Shippers
        Connection.Shippers
      
      
        States
        
          Name,System.String
          USPS,System.String
          Population,System.Int32
          Capital,System.String
        
        
        States
        Connection.States
      
      
        Suppliers
        
          SupplierID,System.Int32
          CompanyName,System.String
          ContactName,System.String
          ContactTitle,System.String
          Address,System.String
          City,System.String
          Region,System.String
          PostalCode,System.String
          Country,System.String
          Phone,System.String
          Fax,System.String
          HomePage,System.String
        
        
        Suppliers
        Connection.Suppliers
      
    
    
      
        Orders
        
          OrderID
        
        
        
        Orders
        Orders
        
          OrderID
        
        
      
      
        Order_Details
        
          OrderID
        
        
        
        Order_Details
        Order_Details
        
          OrderID
        
        
      
    
    
    
  
  EngineV2
  
  
  
    
      None;Black;2;Solid;False;4;Black
      Transparent
      
        
          Transparent
          0,0.2,7.72,0.3
          
            
              None;Transparent;1;Solid;False;4;Black
              Transparent
              0,0,2.1,0.2
              
              Arial,12,Bold
              0,0,0,0
              Text1
              
              
              {Orders.CustomerID}
              Black
            
          
          {Orders.CustomerID}
          
          CustomerIDGroupHeaderBand
          
          
        
        
          Transparent
          0,0.9,7.72,0
          
          {Orders.OrderID}
          
          OrderIDGroupHeaderBand
          
          
        
        
          Transparent
          
          0,1.3,7.72,0
          
          
          
          Orders
          
          MasterDataBand
          
          
          
        
        
          Transparent
          0,1.7,7.72,0.2
          
            
              None;Transparent;1;Solid;False;4;Black
              Transparent
              1.9,0,1.7,0.2
              
              Arial,12,Bold
              0,0,0,0
              Text2
              
              
              {Orders.OrderID}
              Black
            
            
              None;Transparent;1;Solid;False;4;Black
              Transparent
              5.8,0,1.9,0.2
              
              Arial,12,Bold
              3c99e5c0b69e4358a34a10de9082be81
              0,0,0,0
              Text10
              
              
              {Sum(MasterDataBand:DetailDataBand,Order_Details.Quantity)}
              Black
              Expression
            
            
              None;Transparent;1;Solid;False;4;Black
              Transparent
              4.5,0,1.3,0.2
              
              Arial,12,Bold
              9245b1746b074f1d94c1e89d08b03dd6
              0,0,0,0
              Text11
              
              
              Qty for Order ID:
              Black
              Expression
            
          
          
          OrderIDGroupFooterBand
          
          
        
        
          Transparent
          0,2.3,7.72,0.3
          
            
              None;Transparent;1;Solid;False;4;Black
              Transparent
              5.8,0,1.9,0.2
              
                _x007B_Totals.Sum_x0028_MasterDataBand:DetailDataBand_x002C_Order_Details.Quantity_x0029__x0020__x003E__x0020_200_x007D_,Red,Transparent,Arial_x002C_8,True,False,,,None
              
              Arial,12,Bold
              f01a2aefdeeb42c399483b6d893c9618
              0,0,0,0
              Text7
              
              
              {Sum(MasterDataBand:DetailDataBand,Order_Details.Quantity)}
              Black
              Expression
            
            
              None;Transparent;1;Solid;False;4;Black
              Transparent
              4.1,0,1.7,0.2
              
              Arial,12,Bold
              0,0,0,0
              Text8
              
              
              Qty for Customer ID:
              Black
              Expression
            
          
          
          CustomerIDGroupFooterBand
          
          
        
        
          Transparent
          0,3,7.72,0.3
          
            
              None;Transparent;1;Solid;False;4;Black
              Transparent
              5.8,0,1.9,0.2
              
              Arial,12,Bold
              e970ecbde2e5498296081d077aa7e048
              0,0,0,0
              Text4
              
              
              {Sum(MasterDataBand:DetailDataBand,Order_Details.Quantity)}
              Black
              Expression
            
            
              None;Transparent;1;Solid;False;4;Black
              Transparent
              4.9,0,0.9,0.2
              
              Arial,12,Bold
              9ca1d928c7514e95a25815e61e1286eb
              0,0,0,0
              Text9
              
              
              Total Qty:
              Black
              Expression
            
          
          
          MasterFooterBand
          
          
        
        
          Transparent
          
          True
          0,3.7,7.72,0
          
          
          Orders
          Order Details
          
          
          DetailDataBand
          
          
          
        
      
      
      d8885812eb6c4a3fb6f6490853025f5d
      0.39,0.39,0.39,0.39
      Page1
      11
      8.5
      Letter
      
      
        Arial,100
        [50:0:0:0]
      
    
  
  
  
    System.Dll
    System.Drawing.Dll
    System.Windows.Forms.Dll
    System.Data.Dll
    System.Xml.Dll
    Stimulsoft.Controls.Dll
    Stimulsoft.Base.Dll
    Stimulsoft.Report.Dll
  
  Report
  12/16/2011 8:16:11 AM
  12/14/2011 4:48:55 PM
  C:\Development Tools\Stimulsoft Reports.Net 2011.3 Trial\MasterDetailSum.mrt
  e3106cc853b44befb02d2adc7a25aae9
  Report
  Inches
  2011.3.1200
  using System;
using System.Drawing;
using System.Windows.Forms;
using System.Data;
using Stimulsoft.Controls;
using Stimulsoft.Base.Drawing;
using Stimulsoft.Report;
using Stimulsoft.Report.Dialogs;
using Stimulsoft.Report.Components;

namespace Reports
{
    public class Report : Stimulsoft.Report.StiReport
    {
        public Report()        {
            this.InitializeComponent();
        }

        #region StiReport Designer generated code - do not modify
        #endregion StiReport Designer generated code - do not modify
    }
}

  CSharp
  
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Master Band - Sum of Detail Band by Group and Total

Post by HighAley »

Hello.

Sorry, we need more time to prepare an answer for you.

Thank you.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Master Band - Sum of Detail Band by Group and Total

Post by Alex K. »

Hello,

Please check the modified report in attachment.

Thank you.
Attachments
1550.Report.mrt
(21.85 KiB) Downloaded 566 times
Post Reply