Telerik.Reporting.
ReportBook masterReport = new Telerik.Reporting.ReportBook();
foreach (string sUrl in MoreUrls)
{
NCATReporting.
CreateReport Myreport = new NCATReporting.CreateReport();
// generate the image and binding it does not work?
WebClient client = new WebClient();
MemoryStream MemStream = new MemoryStream(client.DownloadData(sUrl));
Image image = Image.FromStream(MemStream);
Bitmap imageBitmap = new Bitmap(image);
Myreport.MapReport.Value = imageBitmap;
masterReport.Reports.Add(Myreport);
}
Telerik.Reporting.Processing.
ReportProcessor reportProcessor =
new Telerik.Reporting.Processing.ReportProcessor();
Telerik.Reporting.Processing.
RenderingResult resultPDF = reportProcessor.RenderReport("PDF", masterReport, null);
<UserControl xmlns:my="clr-namespace:Telerik.ReportViewer.Silverlight;assembly=Telerik.ReportViewer.Silverlight" x:Class="Silverlight_Report_Viewer.MainPage" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
mc:Ignorable="d" |
d:DesignHeight="300" d:DesignWidth="400"> |
<Grid x:Name="LayoutRoot" Background="White"> |
<my:ReportViewer Margin="0,0,0,0" Width="Auto" Height="Auto" Report="Reports.Report1, Reports, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" ReportServerUri="../ReportService.svc" /> |
</Grid> |
</UserControl> |
Public Sub New(ByVal strReportName As String, ByVal intReportParam As Integer) |
InitializeComponent() |
mstrReportName = strReportName |
mintReportParam = intReportParam |
AddHandler Me.ReportViewer1.RenderBegin, AddressOf ReportViewer1_RenderBegin |
End Sub |
Private Sub ReportViewer1_RenderBegin(ByVal sender As Object, ByVal args As Telerik.ReportViewer.Silverlight.RenderBeginEventArgs) |
args.ParameterValues("@TenantsID") = "2" |
End Sub |