Excel Export - output pages in new columns rather than rows?

Stimulsoft Reports.Flex discussion
Locked
RodeoClown
Posts: 15
Joined: Thu Feb 24, 2011 9:43 pm
Location: Australia

Excel Export - output pages in new columns rather than rows?

Post by RodeoClown »

Currently when exporting a report to Excel, each page of the report is inserted into the Excel file on a row beneath the previous page.
Is there an option to insert each page starting with the next column, rather than the next row?

Thanks
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Excel Export - output pages in new columns rather than rows?

Post by Andrew »

Hello,

There is no such an option and we do not paln to implement this, because some other workaround ways may exist.
Could you explain your task in more details.

Thank you.
RodeoClown
Posts: 15
Joined: Thu Feb 24, 2011 9:43 pm
Location: Australia

Excel Export - output pages in new columns rather than rows?

Post by RodeoClown »

Hi Andrew,
We write budgeting software and want to report on how money has been categorised each month in a selected period.
We are currently doing this by making a dataTable with columns containing 3 months worth of data on each row, then we divide those three months across the page (see the attached image) and then group them so that each three month period is shown consecutively in the report (although each 3 month grouping may also extend over a page).

Image
(I'd love a better way of doing this if it is possible - I think it might be possible with cross-tabs, but I couldn't get that to work correctly for us, as we need to show multiple pieces of data per month.)

The problem with the excel output is that when we export, it places each of these pages below the other, where we really want to have the months in columns so users can use that data easily. When this happens, data for Jan 2011 is in the same column as data for April 2011 for example.

If you could provide a workaround, or help us get the all the selected months in columns in a different way, that would be great.

Cheers.
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Excel Export - output pages in new columns rather than rows?

Post by Ivan »

Hello,

Can you please send us a sample report template with data or a simple test project, which reproduces the issue?

Thank you.
RodeoClown
Posts: 15
Joined: Thu Feb 24, 2011 9:43 pm
Location: Australia

Excel Export - output pages in new columns rather than rows?

Post by RodeoClown »

Hi Ivan,
I've included the report here, but is there any way to export the data as xml?
We currently have it as a series of objects that we then convert to datatables etc using the following code:

Code: Select all

public override function getReportDataSet(monthNames : Array) : DataSet
{
	var dataSet: DataSet = new DataSet(getDataSetName());
	var table: DataTable = new DataTable("Categories");
	dataSet.tables.add(table);
	
	table.columns.add(new DataColumn("MasterCategory", StorageType.StringType));
	table.columns.add(new DataColumn("SubCategory", StorageType.StringType));
	table.columns.add(new DataColumn("Month0Val", StorageType.DecimalType));
	table.columns.add(new DataColumn("Month1Val", StorageType.DecimalType));
	table.columns.add(new DataColumn("Month2Val", StorageType.DecimalType));
	table.columns.add(new DataColumn("Month0PercentVal", StorageType.DecimalType));
	table.columns.add(new DataColumn("Month1PercentVal", StorageType.DecimalType));
	table.columns.add(new DataColumn("Month2PercentVal", StorageType.DecimalType));
	table.columns.add(new DataColumn("Month0Name", StorageType.StringType));
	table.columns.add(new DataColumn("Month1Name", StorageType.StringType));
	table.columns.add(new DataColumn("Month2Name", StorageType.StringType));
	table.columns.add(new DataColumn("GroupNum", StorageType.DecimalType));
	
	var groupDic : Dictionary = new Dictionary();
	var groupNum : int = 0;
	
	for each (var row : ReportDataRow in dataProvider.dataRows)
	{
		for each (var childRow : ReportDataRow in row.childRows)
		{
			var i : int = 0;
			var newRow : DataRow;
			
			for each (var monthName : String in monthNames)
			{
				if (i == 0)
				{
					newRow = table.addNewRow();
					newRow.sett("MasterCategory", row.label);
					newRow.sett("SubCategory", StringUtilities.trimNullFriendly(childRow.label));
					
					var newGroupNum : int = groupDic[monthName];
					if (!newGroupNum)
					{
						groupDic[monthName] = ++groupNum;
						newGroupNum = groupNum;
					}
					newRow.sett("GroupNum", newGroupNum);
				}
				newRow.sett("Month" + i + "Val", childRow[monthName]);
				newRow.sett("Month" + i + "PercentVal", childRow[monthName + "Percent"]);
				
				newRow.sett("Month" + i + "Name", monthName);
				
				i = (++i)%3;
			}
		}
	}
			
return dataSet;
}
This code takes a series of objects that contain a label and properties with the amount and percentage for each month
(ie - reportDataRow["April '11"] = 250; reportDataRow["April '11Percent"] = 25.5;). Hopefully that makes some sense.

The report:

Code: Select all


  
    
    
      
        Categories
        
          MasterCategory,System.String
          SubCategory,System.String
          Month0Val,System.Decimal
          Month1Val,System.Decimal
          Month2Val,System.Decimal
          Month0PercentVal,System.Decimal
          Month1PercentVal,System.Decimal
          Month2PercentVal,System.Decimal
          Month0Name,System.String
          Month1Name,System.String
          Month2Name,System.String
          GroupNum,System.Decimal
        
        
        Categories
        CategorySpendData.Categories
      
    
    
    
    
  
  EngineV2
  
  
    
      None;Black;2;Solid;False;4;Black;False
      Transparent
      
        
          Transparent
          26.6,8,1.6,0.6
          
          Arial,8
          0,0,0,0
          Text13
          
          
          {Sum()}
          Black
        
        
          Transparent
          0,0.4,19,0.2
          
            
              Bottom;Black;1;Solid;False;4;Black;False
              Transparent
              True
              15,0,4,0.4
              
              Arial,8,Bold
              Center
              0,0,0,0
              Text1
              
              
              {Categories.Month2Name}
              Black
            
            
              Bottom;Black;1;Solid;False;4;Black;False
              Transparent
              True
              10.8,0,4,0.4
              
              Arial,8,Bold
              Center
              0,0,0,0
              Text2
              
              
              {Categories.Month1Name}
              Black
            
            
              Bottom;Black;1;Solid;False;4;Black;False
              Transparent
              True
              6.6,0,4,0.4
              
              Arial,8,Bold
              Center
              0,0,0,0
              Text3
              
              
              {Categories.Month0Name}
              Black
            
          
          {Categories.GroupNum}
          
          GroupHeaderBand1
          
          
          True
        
        
          Transparent
          0,1.4,19,0.2
          
            
              Transparent
              True
              True
              0.4,0,6,0.4
              
              Arial,8,Bold
              0,0,0,0
              Text5
              
              
              {Categories.MasterCategory}
              Black
              HotkeyPrefix=None, LineLimit=False, RightToLeft=False, Trimming=None, WordWrap=True, Angle=0, FirstTabOffset=40, DistanceBetweenTabs=20,
            
          
          {Categories.MasterCategory}
          
          GroupHeaderBand3
          
          
          True
        
        
          Transparent
          0,2.4,19,0.2
          
            
              Transparent
              True
              True
              0.8,0,5.6,0.4
              
              Arial,8
              0,0,0,0
              Text6
              
              
              {Categories.SubCategory}
              Black
              HotkeyPrefix=None, LineLimit=False, RightToLeft=False, Trimming=None, WordWrap=True, Angle=0, FirstTabOffset=40, DistanceBetweenTabs=20,
            
            
              Transparent
              True
              6.6,0,1.6,0.4
              
              Arial,8
              Right
              0,0,0,0
              Text7
              
              
              {Categories.Month0Val}
              Black
              
                ,
                1
                1
                
              
            
            
              Transparent
              True
              10.8,0,1.6,0.4
              
              Arial,8
              Right
              0,0,0,0
              Text8
              
              
              {Categories.Month1Val}
              Black
              
                ,
                1
                1
                
              
            
            
              Transparent
              True
              15,0,1.6,0.4
              
              Arial,8
              Right
              0,0,0,0
              Text9
              
              
              {Categories.Month2Val}
              Black
              
                ,
                1
                1
                
              
            
            
              Transparent
              True
              8.4,0,1.6,0.4
              
              Arial,8
              Right
              0,0,0,0
              Text4
              
              
              {Categories.Month0PercentVal}
              DarkGray
              
                ,
                1
                1
                %
              
            
            
              Transparent
              True
              12.6,0,1.6,0.4
              
              Arial,8
              Right
              0,0,0,0
              Text14
              
              
              {Categories.Month1PercentVal}
              DarkGray
              
                ,
                1
                1
                %
              
            
            
              Transparent
              True
              16.8,0,1.6,0.4
              
              Arial,8
              Right
              0,0,0,0
              Text15
              
              
              {Categories.Month2PercentVal}
              DarkGray
              
                ,
                1
                1
                %
              
            
          
          
          Categories
          Alternate Row Style
          
          DataBand1
          
          
          
        
        
          Transparent
          0,3.4,19,0.2
          
            
              Transparent
              True
              6.6,0,1.6,0.4
              
              Arial,8,Bold
              Right
              0,0,0,0
              Text10
              
              
              {Sum(Categories.Month0Val)}
              Black
              
                ,
                1
                1
                
              
            
            
              Transparent
              True
              10.8,0,1.6,0.4
              
              Arial,8,Bold
              Right
              0,0,0,0
              Text11
              
              
              {Sum(Categories.Month1Val)}
              Black
              
                ,
                1
                1
                
              
            
            
              Transparent
              True
              15,0,1.6,0.4
              
              Arial,8,Bold
              Right
              0,0,0,0
              Text12
              
              
              {Sum(Categories.Month2Val)}
              Black
              
                ,
                1
                1
                
              
            
            
              Transparent
              True
              True
              0.4,0,6,0.4
              
              Arial,8,Bold
              0,0,0,0
              Text17
              
              
              Total {Categories.MasterCategory}
              Black
              HotkeyPrefix=None, LineLimit=False, RightToLeft=False, Trimming=None, WordWrap=True, Angle=0, FirstTabOffset=40, DistanceBetweenTabs=20,
            
            
              Transparent
              True
              8.4,0,1.6,0.4
              
              Arial,8,Bold
              Right
              0,0,0,0
              Text16
              
              
              {Sum(Categories.Month0PercentVal)}
              DarkGray
              
                ,
                1
                1
                %
              
            
            
              Transparent
              True
              12.6,0,1.6,0.4
              
              Arial,8,Bold
              Right
              0,0,0,0
              Text18
              
              
              {Sum(Categories.Month1PercentVal)}
              DarkGray
              
                ,
                1
                1
                %
              
            
            
              Transparent
              True
              16.8,0,1.6,0.4
              
              Arial,8,Bold
              Right
              0,0,0,0
              Text19
              
              
              {Sum(Categories.Month2PercentVal)}
              DarkGray
              
                ,
                1
                1
                %
              
            
          
          
          GroupFooterBand1
          
          
        
        
          Transparent
          0,4.4,19,1
          
            
              Transparent
              True
              10.8,0.4,1.6,0.4
              
              Arial,8,Bold
              Right
              0,0,0,0
              Text20
              
              
              {Sum(Categories.Month1Val)}
              Black
              
                ,
                1
                1
                
              
            
            
              Transparent
              True
              15,0.4,1.6,0.4
              
              Arial,8,Bold
              Right
              0,0,0,0
              Text21
              
              
              {Sum(Categories.Month2Val)}
              Black
              
                ,
                1
                1
                
              
            
            
              Transparent
              True
              6.6,0.4,1.6,0.4
              
              Arial,8,Bold
              Right
              0,0,0,0
              Text23
              
              
              {Sum(Categories.Month0Val)}
              Black
              
                ,
                1
                1
                
              
            
            
              Transparent
              True
              0,0.4,3.4,0.4
              
              Arial,8,Bold
              0,0,0,0
              Text24
              
              
              Black
            
            
              6.6,0.4,4,0.0254
              Black
              
              
                Black
              
              HorizontalLinePrimitive4
              
              
              
                Black
              
            
            
              6.6,0.8,4,0.0254
              Black
              
              
                Black
              
              HorizontalLinePrimitive5
              
              
              
                Black
              
            
            
              6.6,0.85,4,0.0254
              Black
              
              
                Black
              
              HorizontalLinePrimitive6
              
              
              
                Black
              
            
            
              10.8,0.4,4,0.0254
              Black
              
              
                Black
              
              HorizontalLinePrimitive7
              
              
              
                Black
              
            
            
              10.8,0.8,4,0.0254
              Black
              
              
                Black
              
              HorizontalLinePrimitive8
              
              
              
                Black
              
            
            
              10.8,0.85,4,0.0254
              Black
              
              
                Black
              
              HorizontalLinePrimitive9
              
              
              
                Black
              
            
            
              15,0.8,4,0.0254
              Black
              
              
                Black
              
              HorizontalLinePrimitive11
              
              
              
                Black
              
            
            
              15,0.85,4,0.0254
              Black
              
              
                Black
              
              HorizontalLinePrimitive12
              
              
              
                Black
              
            
            
              15,0.4,4,0.0254
              Black
              
              
                Black
              
              HorizontalLinePrimitive1
              
              
              
                Black
              
            
          
          
          GroupFooterBand3
          True
          
          
        
      
      
      4d91fee39d4c6f4fa9636bc60d0c7979
      1,1,1,1
      Page1
      29.7
      21
      
      
        Arial,100
        [50:0:0:0]
      
    
  
  
  Report
  4/25/2011 10:44:54 AM
  2/28/2011 3:01:31 PM
  SpendByCategory.mrt
  0dd1aabb70ecc7fa1c528a1db7d4ef67
  Report
  Centimeters
  2011.2.1001
  CSharp
  
    
      False
      False
      WhiteSmoke
      Style based on formating of 'DataBand1' component
      Arial,8
      Alternate Row Style
      Black
    
  
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Excel Export - output pages in new columns rather than rows?

Post by Andrew »

Hello,

We have investigated your report.
Export to Excel, we will not be redesigned.
There are several ways to solve your problem:
1. Within a month we will finish the cross-bands, and your report can be built directly into the required view.
2. For Reports.FX, from the code, you can move the rendered components directly on a page for getting the required view. This method is much more compicated, but you can get any result.

Thank you.
RodeoClown
Posts: 15
Joined: Thu Feb 24, 2011 9:43 pm
Location: Australia

Excel Export - output pages in new columns rather than rows?

Post by RodeoClown »

Thanks,
I'll wait for the cross-bands to be finished and try again then.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Excel Export - output pages in new columns rather than rows?

Post by Jan »

Ok. Thank you.
Locked