or
TelerikReportServiceClient.ReportService.ReportServiceClient client =
new
TelerikReportServiceClient.ReportService.ReportServiceClient();
List<TelerikReportServiceClient.ReportService.ReportInfo> reports = client.ListAvailableReports().ToList();
i can run the above code and have a list of report in "reports ". the problem is that the list is meanless to me because i cannot create an instance of any of the reports.
unlike in the silverlight report service (http://blogs.telerik.com/evanhutnick/posts/10-02-11/understanding_the_telerik_reporting_wcf_service.aspx)
that has an event.
ServiceClient =
new
ReportServiceClient(ReportViewer.EnsureAbsoluteUri(
new
Uri(
"../ReportService.svc"
, UriKind.RelativeOrAbsolute)));
ServiceClient.ListAvailableReportsCompleted +=
new
EventHandler<ListAvailableReportsEventArgs>(ServiceClient_ListAvailableReportsCompleted);
void
ServiceClient_ListAvailableReportsCompleted(
object
sender, ListAvailableReportsEventArgs e)
{
this
.MyReports = e.Reports;
// Decide which report to load, or place them into a RadComboBox to let the user select different reports!
if
(
this
.MyReports.Count > 0)
{
this
.xReportViewer.Report =
this
.MyReports[1].FullName;
}
}
// First parameter:
this.StorageSystemDataSource.ConnectionString = "...";
this.StorageSystemDataSource.Name = "SystemDataSource";
this.StorageSystemDataSource.SelectCommand = "dbo.GetSystemType";
this.StorageSystemDataSource.SelectCommandType = Telerik.Reporting.SqlDataSourceCommandType.StoredProcedure;
// Second parameter:
this.SystemNameDataSource.ConnectionString = "...";
this.SystemNameDataSource.Name = "SystemNameDataSource";
this.SystemNameDataSource.Parameters.AddRange(new Telerik.Reporting.SqlDataSourceParameter[] {
new Telerik.Reporting.SqlDataSourceParameter("@SystemTypes", System.Data.DbType.AnsiString, "=IIF(Parameters.SystemTypeParameter.Value(0) = -1, Nothing, Join(Parameters.SystemTypeParameter.Value, \",\"))")});
// is that the way to combine the values????
this.SystemNameDataSource.ProviderName = "System.Data.SqlClient";
this.SystemNameDataSource.SelectCommand = "dbo.GetSystemByTypes";
// I need to reactivate this stored procedure on each selection changes of the first parameter values.
this.SystemNameDataSource.SelectCommandType=Telerik.Reporting.SqlDataSourceCommandType.StoredProcedure;