This is a migrated thread and some comments may be shown as answers.

Report attribute

2 Answers 70 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Louis
Top achievements
Rank 1
Iron
Iron
Iron
Louis asked on 14 Jun 2012, 01:32 PM
Hello,

I need to change the Report  attribute in this code (with C#).  It's because I need to change the source of the report during runtime.

<telerik:ReportViewer ID="ReportViewerFiche"
    runat="server" BorderStyle="Solid" BorderWidth="1"       
    Report="Rapports.Fiches.FicheAA.MyReport, Rapports, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" 
    Width="100%" 
    Height="500px" ViewMode="PrintPreview"
>
</telerik:ReportViewer>


Thank you for your help.

2 Answers, 1 is accepted

Sort by
0
Ronald Andrade
Top achievements
Rank 1
answered on 11 May 2013, 05:08 PM
i have this same problem  please help me 
0
Louis
Top achievements
Rank 1
Iron
Iron
Iron
answered on 11 May 2013, 05:55 PM
Yes Sir!

Let me know if it help you or not.  Have nice day.
<form id="form1" runat="server">
<telerik:ReportViewer ID="ReportViewerFiche"
    runat="server" BorderStyle="Solid" BorderWidth="1"       
    Width="100%" onload="ReportViewerFiche_Load"
    Height="500px" ViewMode="PrintPreview"
</telerik:ReportViewer>
</form>
<script runat="server">
 
 
    protected void ReportViewerFiche_Load(object sender, EventArgs e)
    {
        Telerik.Reporting.InstanceReportSource report = new Telerik.Reporting.InstanceReportSource();
        report.ReportDocument = ((Telerik.Reporting.Report)Activator.CreateInstance("Rapports", "ReportsPath").Unwrap());
 
        report.ReportDocument.DocumentName = "Name of my document";
 
        ReportViewerFiche.ReportSource = report;       
    }
</script>
Tags
General Discussions
Asked by
Louis
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Ronald Andrade
Top achievements
Rank 1
Louis
Top achievements
Rank 1
Iron
Iron
Iron
Share this question
or