or
public Stream GetReportBytes(Guid studyId, string userName) { ReportProcessor reportProcessor = new ReportProcessor(); Telerik.Reporting.InstanceReportSource instanceReportSource = new Telerik.Reporting.InstanceReportSource(); ProjectReport reportToExport = new ProjectReport(); reportToExport.ReportParameters[0].Value = studyId.ToString(); reportToExport.ReportParameters[1].Value = userName; instanceReportSource.ReportDocument = reportToExport; RenderingResult result = reportProcessor.RenderReport("PDF", instanceReportSource, null); return new MemoryStream(result.DocumentBytes); }MainChart.PlotArea.Appearance.FillStyle.FillSettings.BackgroundImage = "~/Images/ci_bg.png";Telerik.Reporting.UriReportSource uriReportSource = new Telerik.Reporting.UriReportSource(); uriReportSource.Uri = @"Report\teszt.trdx"; TelRptViewer.ReportSource = uriReportSource;CustomReport customReport = new CustomReport();// ...set reportparameters...this.ReportViewer.Report = customReport;// report is getting generated and viewer shows an error
var reportDefinitionFile = Server.MapPath("~/app/reports/repository/rpt/" + _reportPath);
var xmlSerializer = new ReportXmlSerializer();
reportDocument = (Telerik.Reporting.Report)xmlSerializer.Deserialize(reportDefinitionFile);
var reportSource = new InstanceReportSource();
reportSource.ReportDocument = reportDocument;
trdParameters.ReportSource = reportSource;protected override void OnInit(EventArgs e){ reportDocument.ItemDataBound += new EventHandler(reportDocument_ItemDataBound);
base.OnInit(e);}private void reportDocument_ItemDataBound(object sender, EventArgs e){ Telerik.Reporting.Processing.Report rpt = (Telerik.Reporting.Processing.Report)sender; var obj = rpt.Parameters;}