processor.RenderReport(reporter.RenderFormat,this, null).DocumentBytes;
(reporter.RenderFormat will be either PDF or HTML. This is also set based on the above said property)
System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding();
lblRecordContent.Text = enc.GetString(value);
),
I have two problems.
1. Page footer section is still shown which is not required in case of HTML view.
<
Telerik_ReportViewer_Silverlight:ReportViewer
Margin
=
"8"
ReportServerUri
=
"../ReportService1.svc"
Name
=
"myReportView"
Report
=
"Telerik.Reporting.ClassLibrary1, ClassLibrary1.Report1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
/>
crosstab1.RowGroups.Clear();
crosstab1.ColumnGroups.Clear();
crosstab1.Body.Columns.Clear();
crosstab1.Body.Rows.Clear();
crosstab1.Items.Clear();
crosstab1.Corner.ClearCellContent();
crosstab1.Body.Columns.Add(new TableBodyColumn(new Unit(2D, UnitType.Inch)));
crosstab1.Body.Columns.Add(new TableBodyColumn(new Unit(2D, UnitType.Inch)));
crosstab1.Body.Rows.Add(new TableBodyRow(new Unit(0.26D, UnitType.Inch)));
TextBox txtBx = new TextBox() { Size = new SizeU(new Unit(2D, UnitType.Inch), new Unit(0.26D, UnitType.Inch)), Value = "=Fields.Jun2011" };
crosstab1.Items.Add(txtBx);
crosstab1.Body.SetCellContent(0, 0, txtBx);
txtBx = new TextBox() { Size = new SizeU(new Unit(2D, UnitType.Inch), new Unit(0.26D, UnitType.Inch)), Value = "=Fields.Jul2011" };
crosstab1.Items.Add(txtBx);
crosstab1.Body.SetCellContent(0, 1, txtBx);
TableGroup group1 = new TableGroup();
group1.Groupings.Add(new Telerik.Reporting.Data.Grouping("=\'ColumnGroup\'"));
txtBx = new TextBox() { Size = new SizeU(new Unit(2D, UnitType.Inch), new Unit(0.26D, UnitType.Inch)), Value = "June 2011" };
crosstab1.Items.Add(txtBx);
group1.ReportItem = txtBx;
TableGroup group2 = new TableGroup();
txtBx = new TextBox() { Size = new SizeU(new Unit(2D, UnitType.Inch), new Unit(0.26D, UnitType.Inch)), Value = "July 2011" };
crosstab1.Items.Add(txtBx);
group2.ReportItem = txtBx;
crosstab1.ColumnGroups.Add(group1);
crosstab1.ColumnGroups.Add(group2);
txtBx = new TextBox() { Size = new SizeU(new Unit(2D, UnitType.Inch), new Unit(0.26D, UnitType.Inch)), Value = "Project Name" };
crosstab1.Items.Add(txtBx);
crosstab1.Corner.SetCellContent(0, 0, txtBx);
txtBx = new TextBox() { Size = new SizeU(new Unit(2D, UnitType.Inch), new Unit(0.26D, UnitType.Inch)), Value = "Type Of Financial" };
crosstab1.Items.Add(txtBx);
crosstab1.Corner.SetCellContent(0, 1, txtBx);
TableGroup group4 = new TableGroup();
group4.Groupings.Add(new Telerik.Reporting.Data.Grouping("=Fields.TypeOfFinancial"));
txtBx = new TextBox() { Size = new SizeU(new Unit(2D, UnitType.Inch), new Unit(0.26D, UnitType.Inch)), Value = "=Fields.TypeOfFinancial" };
crosstab1.Items.Add(txtBx);
group4.ReportItem = txtBx;
group4.Sortings.Add(new Telerik.Reporting.Data.Sorting("=Fields.TypeOfFinancial", Telerik.Reporting.Data.SortDirection.Asc));
TableGroup group3 = new TableGroup();
group3.ChildGroups.Add(group4);
group3.Groupings.Add(new Telerik.Reporting.Data.Grouping("=Fields.ProjectName"));
txtBx = new TextBox() { Size = new SizeU(new Unit(2D, UnitType.Inch), new Unit(0.26D, UnitType.Inch)), Value = "=Fields.ProjectName" };
crosstab1.Items.Add(txtBx);
group3.ReportItem = txtBx;
crosstab1.RowGroups.Add(group3);
crosstab1.DataSource = ConstructDataTable();
I have a senario similar to this:
class
CarManufacture
{
String Name { get; set; }
String Description { get; set; }
List<Model> CarModels {
get
;
set
; }
List<Model> TruckModels {
get
;
set
; }
}
class
Model
{
string
ModelName {
get
;
set
; }
}
The list of Manufactures will be the datasource, and it won't be a fixed count. What I want to do is show the Manufactures horizontally, and below them, the lists of cars and trucks. So something like this:
Chevrolet Ford Nissan
[Description] [Discription] [Description]
Cars Malibu Mustang Altima
Impala Fusion Maxima
Camaro Versa
Trucks Colorado F150 Titan
Silverado F250
How can I accomplish this? I'm trying with a CrossTab, but can't quite figure it out. Are there any examples of something like this?