Beispiel #1
0
		override internal void Run(IPresent ip, Row row)
		{
			Report rpt = ip.Report();
			WorkClass wc = GetValue(rpt);
			wc.FullData = wc.Data = GetFilteredData(rpt, row);

			if (!AnyRows(ip, wc.Data))		// if no rows return
				return;					//   nothing left to do

			int maxColumns;
			int maxRows;
			MatrixCellEntry[,] matrix = RunBuild(rpt, out maxRows, out maxColumns);

			// Now run thru the rows and columns of the matrix passing the information
			//   on to the rendering engine
            int headerRows = _ColumnGroupings.Items.Count;	// number of column headers we have
            if (!ip.MatrixStart(this, matrix, row, headerRows, maxRows, maxColumns))
				return;
			for (int iRow = 0; iRow < maxRows; iRow++)
			{
				ip.MatrixRowStart(this, iRow, row);
				for (int iColumn = 0; iColumn < maxColumns; iColumn++)
				{
					MatrixCellEntry mce = matrix[iRow, iColumn];
					if (mce == null)
					{
						ip.MatrixCellStart(this, null, iRow, iColumn, row, float.MinValue, float.MinValue, 1);
						ip.MatrixCellEnd(this, null, iRow, iColumn, row);
					}
					else
					{
						wc.Data = mce.Data;		// Must set this for evaluation

						Row lrow = wc.Data.Data.Count > 0? wc.Data.Data[0]:null;
						mce.DisplayItem.SetMC(rpt, mce);	// set for use by the display item
						SetGroupingValues(rpt, mce);
												   
						ip.MatrixCellStart(this, mce.DisplayItem, iRow, iColumn, lrow, mce.Height, mce.Width, mce.ColSpan);

						mce.DisplayItem.Run(ip, lrow);
						ip.MatrixCellEnd(this, mce.DisplayItem, iRow, iColumn, lrow);
					}
				}
				ip.MatrixRowEnd(this, iRow, row);
			}
			ip.MatrixEnd(this, row);
			RemoveValue(rpt);
		}