Page 1 of 1

Loading Report in Designer from Viewer

Posted: Wed Jan 03, 2018 1:50 pm
by JohnW
My users would like to be able to edit their reports. To do that I have created a designer.aspx page and placed the designer component on it. I have enabled the designer button and it all works to a point. All of this with the code is done on the viewer side page.

What it does not do is load the rendered report into the designer. It passes the name but the report does not load.

I have the reports (.mrt files) in a application folder called reports.

The code is pretty basic but I must be missing something. I have tried setting paths, etc. without success.

I am looking for suggestions to get this working. The code is below.

Code: Select all

Protected Sub StiWebViewer1_DesignReport(sender As Object, e As StiReportDataEventArgs)

        Dim report As StiReport = e.Report
        Dim repName As String = report.ReportName


        Response.Redirect("Designer.aspx?report=" + repName)
End Sub

Re: Loading Report in Designer from Viewer

Posted: Thu Jan 04, 2018 10:58 am
by HighAley
Hello, John.

You should open the report by its name in the Desinger.
Or you could get a report from the Viewer with StiWebViewer.GetReportObject();
Please, look at our sample https://github.com/stimulsoft/Samples-A ... lt.aspx.cs

Thank you.

Re: Loading Report in Designer from Viewer

Posted: Thu Jan 04, 2018 12:17 pm
by JohnW
Thanks so much for the link!

I did not know I could see the coding. What a great resource and one I was not even aware existed. I will need to convert it to VB.net but I can work with that.

Re: Loading Report in Designer from Viewer

Posted: Fri Jan 05, 2018 10:53 am
by HighAley
Hello, John.

You could use any converter to get the right VB.NET code.
You could also find some samples with description here
https://www.stimulsoft.com/en/samples/aspnet

Thank you.