or
Dim report1 As New ReportLibrary.test1
report1.ReportParameters("parameter1").Value = "NE"
.....................................
.........................................
report1.ReportParameters("parameter17").Value = "test2"
Me.ReportViewer1.Report = report1
this
.chart3.BitmapResolution = 96F;
this
.chart3.ChartTitle.Appearance.Visible =
false
;
this
.chart3.ChartTitle.Visible =
false
;
this
.chart3.DataSource =
this
.sqlDataSource2;
this
.chart3.DefaultType = Telerik.Reporting.Charting.ChartSeriesType.Pie;
this
.chart3.ImageFormat = System.Drawing.Imaging.ImageFormat.Emf;
this
.chart3.Location =
new
Telerik.Reporting.Drawing.PointU(
new
Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Inch),
new
Telerik.Reporting.Drawing.Unit(7.800079345703125D, Telerik.Reporting.Drawing.UnitType.Inch));
this
.chart3.Name =
"chart3"
;
chartMargins5.Bottom =
new
Telerik.Reporting.Charting.Styles.Unit(1D, Telerik.Reporting.Charting.Styles.UnitType.Percentage);
chartMargins5.Left =
new
Telerik.Reporting.Charting.Styles.Unit(1D, Telerik.Reporting.Charting.Styles.UnitType.Percentage);
chartMargins5.Right =
new
Telerik.Reporting.Charting.Styles.Unit(24D, Telerik.Reporting.Charting.Styles.UnitType.Percentage);
chartMargins5.Top =
new
Telerik.Reporting.Charting.Styles.Unit(1D, Telerik.Reporting.Charting.Styles.UnitType.Percentage);
this
.chart3.PlotArea.Appearance.Dimensions.Margins = chartMargins5;
this
.chart3.PlotArea.XAxis.MinValue = 1D;
chartSeries1.Appearance.LegendDisplayMode = Telerik.Reporting.Charting.ChartSeriesLegendDisplayMode.ItemLabels;
chartSeries1.Appearance.ShowLabelConnectors =
true
;
chartSeries1.DataLabelsColumn =
"Department"
;
chartSeries1.DataYColumn =
"TotalJobs"
;
chartSeries1.Name =
"Jobs"
;
chartSeries1.Type = Telerik.Reporting.Charting.ChartSeriesType.Pie;
this
.chart3.Series.AddRange(
new
Telerik.Reporting.Charting.ChartSeries[] {
chartSeries1});
this
.chart3.Size =
new
Telerik.Reporting.Drawing.SizeU(
new
Telerik.Reporting.Drawing.Unit(5.7999601364135742D, Telerik.Reporting.Drawing.UnitType.Inch),
new
Telerik.Reporting.Drawing.Unit(2.8998820781707764D, Telerik.Reporting.Drawing.UnitType.Inch));
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReportHolder.aspx.cs" Inherits="Audit.Audit_Reports.ReportHolder" %>
<%@ Register assembly="Telerik.ReportViewer.WebForms, Version=5.1.11.713, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" namespace="Telerik.ReportViewer.WebForms" tagprefix="telerikrv" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
>Report Holder</
title
>
<
style
type
=
"text/css"
>
html, body, form#form1, div#Content
{
margin: 0px;
padding: 0px;
height: 100%;
}
</
style
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
>
</
telerik:RadScriptManager
>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
UpdatePanelsRenderMode
=
"Inline"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"ReportViewer1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"ReportViewer1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadCodeBlock
ID
=
"RadCodeBlock1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
</
script
>
</
telerik:RadCodeBlock
>
<
telerik:RadSplitter
ID
=
"RadSplitter1"
runat
=
"server"
Height
=
"100%"
Width
=
"100%"
>
<
telerik:RadPane
ID
=
"RadPane1"
Runat
=
"server"
Scrolling
=
"None"
onclientresized
=
"ResizeViewer"
>
<
div
id
=
"Content"
>
<
telerikrv:ReportViewer
ID
=
"ReportViewer1"
runat
=
"server"
Height
=
"100%"
Width
=
"100%"
ShowHistoryButtons
=
"False"
ShowParametersButton
=
"False"
>
</
telerikrv:ReportViewer
>
</
div
>
</
telerik:RadPane
>
</
telerik:RadSplitter
>
</
form
>
</
body
>
</
html
>
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Web;
using
System.Web.UI;
using
System.Web.UI.WebControls;
namespace
Audit.Audit_Reports
{
public
partial
class
ReportHolder : System.Web.UI.Page
{
private
Telerik.Reporting.IReportDocument Get_Report(
string
RepName)
{
try
{
Type t = Type.GetType(
"Audit.Audit_Reports."
+ RepName);
Telerik.Reporting.IReportDocument ret = (Telerik.Reporting.IReportDocument)(Activator.CreateInstance(t));
foreach
(
string
QRKey
in
Request.QueryString.Keys)
{
if
(QRKey !=
"Report"
)
{
// Is a parameter to set
Telerik.Reporting.Report rep = (Telerik.Reporting.Report)ret;
if
(rep.ReportParameters.Contains(QRKey))
{
rep.ReportParameters[QRKey].Value = Request.QueryString[QRKey];
}
}
}
return
ret;
}
catch
(Exception oE)
{
return
null
;
}
}
protected
void
Page_Load(
object
sender, EventArgs e)
{
if
(!IsPostBack)
{
Telerik.Reporting.IReportDocument rd = Get_Report(Request.QueryString[
"Report"
]);
if
(rd !=
null
)
{
ReportViewer1.Report = rd;
this
.Title = rd.DocumentName;
ReportViewer1.ShowParametersButton =
true
;
}
}
}
}
}