Grouping CrossTab

Stimulsoft Reports.PHP discussion
Post Reply
Nathan
Posts: 21
Joined: Wed Dec 07, 2011 2:24 pm

Grouping CrossTab

Post by Nathan »

Is it possible to group a CrossTab.
This is what I am trying to achieve.

GroupHeaderBand
DataBand
CrossTab
GroupFooterBand

I am using one DataSource and trying to group by of the columns in the DataSource.
The CrossTab works fine with and without the GroupBand, but with the GroupBand it does not break the CrossTab up into groups.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Grouping CrossTab

Post by HighAley »

Hello.
ivanleblanc wrote:Is it possible to group a CrossTab.
This is what I am trying to achieve.

GroupHeaderBand
DataBand
CrossTab
GroupFooterBand

I am using one DataSource and trying to group by of the columns in the DataSource.
The CrossTab works fine with and without the GroupBand, but with the GroupBand it does not break the CrossTab up into groups.
Please, send us a sample report template with data for analysis.

Thank you.
Nathan
Posts: 21
Joined: Wed Dec 07, 2011 2:24 pm

Grouping CrossTab

Post by Nathan »

I want to group on "Shift" column.
There is 3 records. 2 that are "Night" and 1 that is "Day".
I would expect to have 2 CrossTab grids, but I am only getting one.

Report Template:

Code: Select all



  
    
      
        Connection1
        Connection1
        C:\wamp\www\reports\custom\valero\data.xml
        C:\wamp\www\reports\custom\valero\data.xsd
      
    
    
      
        Labor
        
          PID,System.String
          DateWorked,System.String
          dateint,System.String
          DateFormated,System.String
          Shift,System.String
          PT,System.String
          PTTotal,System.String
          Direct,System.String
          Scope,System.String
          OOP,System.String
          WorkDescription,System.String
          manning_id,System.String
          EmployeeName,System.String
          TeamWO,System.String
          CustomerWO,System.String
          Classification,System.String
          OTRate,System.String
          PTRate,System.String
          Contract,System.String
          cust_po_id,System.String
          CustomerPO,System.String
          Lodging,System.String
          PerDiem,System.String
          Mob,System.String
          ST,System.String
          STRate,System.String
          STTotal,System.String
          OT,System.String
          OTTotal,System.String
          LaborHrs,System.String
          LaborCharge,System.String
          TravelHrs,System.String
          TravelCharge,System.String
          LaborTravelCharge,System.String
          TotalCharge,System.String
        
        
        Labor
        Connection1.row
      
    
    
    
    
      ,From,Date,,System.DateTime,_x0030_2_x002F_28_x002F_2012_x0020_00_x003A_00_x003A_00_x0020_AM,False,False,True
      ,To,To,System.DateTime,_x0030_2_x002F_29_x002F_2012_x0020_00_x003A_00_x003A_00_x0020_AM,False,False
    
  
  EngineV2
  
  
  
    
      None;Black;2;Solid;False;4;Black
      Transparent
      
        
          Transparent
          0,0.4,25.9,0.6
          
            
              Transparent
              0,0,4.8,0.6
              
              Arial,12,Bold
              0,0,0,0
              Text3
              
              
              {Labor.Shift} Shift
              Black
              Center
            
          
          {Labor.Shift}
          
          GroupHeaderBand1
          
          
        
        
          Transparent
          True
          0,1.8,25.9,5.8
          
            
              Transparent
              0,0,25.8,5.6
              
                
                  All;[69:69:69];1;Solid;False;4;Black
                  [219:219:219]
                  5.11,0.65,1.09,1.2
                  
                  Arial,9
                  a6fc63fe8f8b4f810e4ad4262e4d4bf9
                  0,0,0,0
                  CrossTab1_ColTotal1
                  
                  
                  AllowMove, AllowResize, AllowSelect, AllowChange
                  Total
                  Black
                
                
                  All;[69:69:69];1;Solid;False;4;Black
                  [219:219:219]
                  5.11,1.25,0,0
                  
                  Arial,9
                  1c744b7aa6cc803a72a7d4265827cddd
                  0,0,0,0
                  CrossTab1_ColTotal2
                  
                  
                  AllowMove, AllowResize, AllowSelect, AllowChange
                  Total
                  Black
                
                
                  All;[69:69:69];1;Solid;False;4;Black
                  [219:219:219]
                  0,3.7,2.6,1.8
                  
                  Arial,9
                  5c6c9a8098f679c89c8dd426ac65532f
                  0,0,0,0
                  CrossTab1_RowTotal1
                  
                  
                  AllowMove, AllowResize, AllowSelect, AllowChange
                  Total
                  Black
                
                
                  All;[69:69:69];1;Solid;False;4;Black
                  DarkGray
                  0,0.65,2.6,1.2
                  Arial,9
                  fb515b09364328f8b9b1d426ac661091
                  0,0,0,0
                  CrossTab1_Row1_Title
                  
                  
                  AllowMove, AllowResize, AllowSelect, AllowChange
                  Employee
                  [19:19:19]
                  Row:CrossTab1_Row1
                
                
                  All;[69:69:69];1;Solid;False;4;Black
                  DarkGray
                  0,0,2.6,0.6
                  Arial,9
                  f63aafb7a0bc74b43e32d426ac6658bb
                  0,0,0,0
                  CrossTab1_LeftTitle
                  
                  
                  AllowMove, AllowResize, AllowSelect, AllowChange
                  Labor / Daily Travel
                  [19:19:19]
                  LeftTitle
                
                
                  All;[69:69:69];1;Solid;False;4;Black
                  DarkGray
                  2,1.9,0.6,0.6
                  
                  Arial,9
                  b1c83ac630ac59c47267d426ea95f9ea
                  0,0,0,0
                  CrossTab1_SumHeader1
                  
                  
                  AllowMove, AllowResize, AllowSelect, AllowChange
                  ST
                  [19:19:19]
                
                
                  All;[69:69:69];1;Solid;False;4;Black
                  DarkGray
                  2,2.5,0.6,0.6
                  
                  Arial,9
                  7f3c1fa6aec91761044dd426ea955575
                  0,0,0,0
                  CrossTab1_SumHeader2
                  
                  
                  AllowMove, AllowResize, AllowSelect, AllowChange
                  OT
                  [255:0:0]
                
                
                  All;[69:69:69];1;Solid;False;4;Black
                  DarkGray
                  2,3.1,0.6,0.6
                  
                  Arial,9
                  a1ea6913f5ed7f1041b2d426fb64b175
                  0,0,0,0
                  CrossTab1_SumHeader3
                  
                  
                  AllowMove, AllowResize, AllowSelect, AllowChange
                  PD
                  [19:19:19]
                
                
                  EmployeeName
                  All;[69:69:69];1;Solid;False;4;Black
                  DarkGray
                  0,1.9,2,1.8
                  
                  {Labor.EmployeeName}
                  Arial,9
                  e87fd5d65928b48cec2fd426ac5fb6c0
                  0,0,0,0
                  CrossTab1_Row1
                  
                  
                  AllowMove, AllowResize, AllowSelect, AllowChange
                  EmployeeName
                  [19:19:19]
                  5c6c9a8098f679c89c8dd426ac65532f
                  {Labor.EmployeeName}
                
                
                  CustomerPO
                  All;[69:69:69];1;Solid;False;4;Black
                  DarkGray
                  2.65,0.65,2.46,0.6
                  
                  {Labor.CustomerPO}
                  Arial,9
                  1b44921ac0fabfd032e9d4262e3f4d5e
                  0,0,0,0
                  CrossTab1_Column1
                  
                  
                  AllowMove, AllowResize, AllowSelect, AllowChange
                  CustomerPO
                  [19:19:19]
                  a6fc63fe8f8b4f810e4ad4262e4d4bf9
                  {Labor.CustomerPO}
                
                
                  CustomerWO
                  All;[69:69:69];1;Solid;False;4;Black
                  DarkGray
                  2.65,1.25,2.46,0.6
                  
                  {Labor.CustomerWO}
                  Arial,9
                  157fe8cf61668cbbd9b1d426582146fd
                  0,0,0,0
                  CrossTab1_Column2
                  
                  
                  AllowMove, AllowResize, AllowSelect, AllowChange
                  False
                  CustomerWO
                  [19:19:19]
                  1c744b7aa6cc803a72a7d4265827cddd
                  {Labor.CustomerWO}
                
                
                  ST
                  All;[69:69:69];1;Solid;False;4;Black
                  [255:255:255]
                  2.65,1.9,2.46,0.6
                  
                  Arial,9
                  06b6ce5d2b55f5fbc03fd426d0efcefa
                  Right
                  0,0,0,0
                  CrossTab1_Sum1
                  
                  
                  AllowMove, AllowResize, AllowSelect, AllowChange
                  0
                  Black
                  
                    
                    1
                    False
                  
                  {Labor.ST}
                
                
                  OT
                  All;[69:69:69];1;Solid;False;4;Black
                  [255:255:255]
                  2.65,2.5,2.46,0.6
                  
                  Arial,9
                  b787d8ea6e0dd4524580d426ea8fe7da
                  Right
                  0,0,0,0
                  CrossTab1_Sum2
                  
                  
                  AllowMove, AllowResize, AllowSelect, AllowChange
                  0
                  [255:0:0]
                  
                    
                    1
                    False
                  
                  {Labor.OT}
                
                
                  PerDiem
                  All;[69:69:69];1;Solid;False;4;Black
                  [255:255:255]
                  2.65,3.1,2.46,0.6
                  
                  Arial,9
                  6e18ee221f5b2f72e328d426fb5ecde4
                  Right
                  0,0,0,0
                  CrossTab1_Sum3
                  
                  
                  AllowMove, AllowResize, AllowSelect, AllowChange
                  0
                  Black
                  
                    ,
                    1
                    0
                    False
                  
                  {Labor.PerDiem}
                
                
                  All;[69:69:69];1;Solid;False;4;Black
                  DarkGray
                  2.65,0,3.56,0.6
                  Arial,9
                  a04e10291fb9c27c56ead426fb6450bf
                  0,0,0,0
                  CrossTab1_RightTitle
                  
                  
                  AllowMove, AllowResize, AllowSelect, AllowChange
                  Customer PO, Customer WO
                  [19:19:19]
                  RightTitle
                
              
              
              -1
              
              Labor
              
              
              CrossTab1
              
              
              
              True
            
          
          
          Labor
          
          DataBand1
          
          
          
        
        
          Transparent
          0,8.4,25.9,0.6
          
          
          GroupFooterBand1
          
          
        
      
      
      f3a82d42a0377999de15817ecf583c7e
      1,1,1,1
      Page1
      Landscape
      21.6
      27.9
      Letter
      
      
        Arial,100
        [50:0:0:0]
      
    
  
  
  Tracks
  Nathan LeBlanc
  03/14/2012 01:50:13 PM
  02/15/2012 08:51:05 AM
  Valero Daily Tracks
  C:\wamp\www\reports\custom\valero\Tracks-shift.mrt
  747e2a4d44b647c66935128bcca45bf1
  Tracks
  Centimeters
  2012.1.1215
  CSharp
  
    
      All;Black;1;Solid;False;4;Black
      Transparent
      
      Arial,8
      Grids
      Black
    
    
      Ivory
      
      Arial,8
      EvenGridColor
      Black
    
    
      All;Black;1;Solid;False;4;Black
      DodgerBlue
      
      Arial,8,Bold
      LaborHeader
      Black
    
    
      All;Black;1;Solid;False;4;Black
      MediumSeaGreen
      
      Arial,8,Bold
      NonLaborHeader
      Black
    
  

XSD:

Code: Select all




  
    
      
        
          
            
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
            
          
        
      
    
  

XML Data:

Code: Select all

52012-03-161331874000Fri 03/16Day00DirectIn Scope016Adams, Rex Leesss2203746LVL II Tech4545NDE Ratese47CPO-1f000035000002000
52012-03-161331874000Fri 03/16Night00DirectIn Scope0sssss20JACKSON, PATRICK14612246992203746LVL II Tech4545NDE Ratese47CPO-1f00003503135313500135135
52012-03-161331874000Fri 03/16Night00DirectIn Scope0sssss21LEBLANC, RAYMOND G14612246992203746LVL II Tech4545NDE Ratese47CPO-1f000035000000000

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

Grouping CrossTab

Post by HighAley »

Hello.
ivanleblanc wrote:I want to group on "Shift" column.
There is 3 records. 2 that are "Night" and 1 that is "Day".
I would expect to have 2 CrossTab grids, but I am only getting one.
The problem is that you use one Data Source two times in the Data Band and in the Cross-tab. Please try to add second Data Source and move Cross-tab to the Group Header.

Please. look at the attached report template.

Thank you.
Attachments
1723.report.mrt
(25.51 KiB) Downloaded 1112 times
Nathan
Posts: 21
Joined: Wed Dec 07, 2011 2:24 pm

Grouping CrossTab

Post by Nathan »

Thank you, exact results I was wanting.
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Grouping CrossTab

Post by Andrew »

Hello,

Perfect.

Thank you for letting us know about this.
Post Reply