public
partial
class
ProductsReport : Telerik.Reporting.Report
{
public
ProductsReport()
{
InitializeComponent();
detail.ItemDataBound += detail_ItemDataBinding;
}
private
void
detail_ItemDataBinding(
object
sender, EventArgs e)
{
var section = sender
as
Telerik.Reporting.Processing.DetailSection;
var processingTable = section.ChildElements.Find(
"periodsTable"
,
true
)[0]
as
Telerik.Reporting.Processing.Table;
var dataObject = section.DataObject;
var productPricingInfos = dataObject.RawData
as
ProductPricingInfos;
processingTable.DataSource = productPricingInfos.ProductPricePeriods;
//create two HtmlTextBox items (one for header and one for data) which would be added to the items collection of the table
Telerik.Reporting.HtmlTextBox textboxHeader;
Telerik.Reporting.HtmlTextBox textBoxData;
//we do not clear the Rows collection, since we have a details row group and need to create columns only
this
.periodsTable.ColumnGroups.Clear();
this
.periodsTable.Body.Columns.Clear();
this
.periodsTable.Body.Rows.Clear();
int
i = 0;
this
.periodsTable.ColumnHeadersPrintOnEveryPage =
true
;
//common fields
var tableGroupColumnCommon =
new
Telerik.Reporting.TableGroup();
periodsTable.ColumnGroups.Add(tableGroupColumnCommon);
periodsTable.Body.Columns.Add(
new
Telerik.Reporting.TableBodyColumn(Unit.Inch(1)));
textboxHeader =
new
Telerik.Reporting.HtmlTextBox();
textboxHeader.Style.BorderColor.Default = Color.Black;
textboxHeader.Style.BorderStyle.Default = BorderType.Solid;
textboxHeader.Value =
"Du"
;
textboxHeader.Size =
new
SizeU(Unit.Inch(1.1), Unit.Inch(0.3));
tableGroupColumnCommon.ReportItem = textboxHeader;
textBoxData =
new
Telerik.Reporting.HtmlTextBox();
textBoxData.Style.BorderColor.Default = Color.Black;
textBoxData.Style.BorderStyle.Default = BorderType.Solid;
textBoxData.Value =
"=Fields.StartDate"
;
textBoxData.Size =
new
SizeU(Unit.Inch(1.1), Unit.Inch(0.3));
this
.periodsTable.Body.SetCellContent(0, i++, textBoxData);
this
.periodsTable.Items.AddRange(
new
ReportItemBase[] { textBoxData, textboxHeader });
}
}
Hi everybody..
i've created one SSRS in that i've connected to the database having four fields..
now want i want is to calculate the salary page by page and at the last grand
total..
i've kept one extra column in table and kept one running field and made it as
hidden. i've taken one textbox and placed in page footer with the
expression="PAGE RECORD TOTAL="& Last(reportitems("Subtotal1").Value)
where subtotal1 is a running field and i'm taking the last value of that.. and printing in
page footer..
Now my problem is when i run the report the value will be present but when
i click on preview or take the print the value will be disappeared..
please help me..
And when i make the running field hidden=false then it will display while printing also..
i dont want to show the running field i want to hide it..
i've created the report with the following link
http://community.dynamics.com/blogs/navteam/archive/2010/03/17/transfooter-and-transheader-functionality-in-rdlc-40-ssrs-41-reports.aspx
please help me
using
System;
using System.Web.UI.WebControls;
using System.Web;
namespace drc.okc.wss
{
public class NWRM_Dashboard : System.Web.UI.WebControls.WebParts.WebPart
{
protected override void RenderContents(System.Web.UI.HtmlTextWriter writer)
{
Telerik.ReportViewer.WebForms.ReportViewer ourReportViewer =
new Telerik.ReportViewer.WebForms.ReportViewer();
ourReportViewer.Report =
new drc.okc.iuid.reports.Metrics.NWRM_Summary();
this.Controls.Add(ourReportViewer);
ourReportViewer.RenderControl(writer);
}
}
}