hi there,
i am consuming the telerik reporting in an ASP .NET MVC. Earlier i was showing a static image in the report.Now i want to show it dynamically. This image is located in the location "/Content/images/ReportImages" of ASP .NET MVC project.
in the asp .net mvc i have some(the view ) thing like this
And Here is the reporting class
The report contains a "Picture Box" with name "pictureBox1" .
i have already seen some solutions . But as i only aware of MVC frame work . i could not understand the events stuff. so
Can you please help me with this ,keeping my existing code in mind.
Thanks
i am consuming the telerik reporting in an ASP .NET MVC. Earlier i was showing a static image in the report.Now i want to show it dynamically. This image is located in the location "/Content/images/ReportImages" of ASP .NET MVC project.
in the asp .net mvc i have some(the view ) thing like this
<body> <div style="width: 700px; margin-left: auto; margin-right: auto;"> <a href='/Patients/Show/<%= ViewData["PatientId"] %>' class="button">Current User</a><br /> <br /> <script runat="server"> //protected override void OnPreRender(EventArgs e) { // ReportViewer1.Report = new Report1(); // base.OnPreRender(e); //} public override void VerifyRenderingInServerForm(Control control) { // to avoid the server form (<form runat="server">) requirement } protected override void OnLoad(EventArgs e) { base.OnLoad(e); // bind the report viewer var priliminaryReport = new PatientPriliminaryReport(); priliminaryReport.ReportParameters["patientId"].Value = ViewData["PatientId"]; priliminaryReport.ReportParameters["userId"].Value = ViewData["UserId"]; ReportViewer1.Report = priliminaryReport; } </script> <form id="Form1" runat="server"> <telerik:ReportViewer ID="ReportViewer1" runat="server" Height="1100px" Width="700px"> </telerik:ReportViewer> </form> </div></body>And Here is the reporting class
namespace Faq.Reports { using System; using System.ComponentModel; using System.Drawing; using System.Windows.Forms; using Telerik.Reporting; using Telerik.Reporting.Drawing; /// <summary> /// Summary description for PatientPriliminaryReport. /// </summary> public partial class PatientPriliminaryReport : Telerik.Reporting.Report { public PatientPriliminaryReport() { // // Required for telerik Reporting designer support // InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // } }}The report contains a "Picture Box" with name "pictureBox1" .
i have already seen some solutions . But as i only aware of MVC frame work . i could not understand the events stuff. so
Can you please help me with this ,keeping my existing code in mind.
Thanks