There is documentation on how to program a Graph (http://www.telerik.com/help/reporting/graphhowtocreateprogrammaticallygraph.html), but I can't find any to programmatically create a Telerik Report.- How do you do this?
I have tried this, but am not sure if I am on the right track?
Following the Graph's tutorial, what Telerik.Reporting.Report() properties must I set, other than 'Name'?
}
I have tried this, but am not sure if I am on the right track?
Following the Graph's tutorial, what Telerik.Reporting.Report() properties must I set, other than 'Name'?
public
partial
class
Report1 : Telerik.Reporting.Report
{
public
Report1()
{
//InitializeComponent(); //Not used, as not using Designer...right??
//Set up the datasource:
Telerik.Reporting.SqlDataSource sqlDataSource =
new
Telerik.Reporting.SqlDataSource();
sqlDataSource.ProviderName =
"System.Data.SqlClient"
;
sqlDataSource.ConnectionString =
"Data Source=..."
;
sqlDataSource.SelectCommand =
"SELECT..."
;
//Instantiate report:
var report =
new
Telerik.Reporting.Report();
report.Name =
"theReport"
; //What other properties must I set??
//Set the data item's DataSource property to the SQL datasource:
report.DataSource = sqlDataSource;
//Some parameters:
sqlDataSource.Parameters.Add(
"@Fields.Name"
, System.Data.DbType.String,
"Blade"
);
//Export to PDF:
exportToPDF(report);
}}