Loading Report in Designer from Viewer

Stimulsoft Reports.WEB discussion
Post Reply
JohnW
Posts: 103
Joined: Mon Nov 20, 2017 8:29 pm

Loading Report in Designer from Viewer

Post 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
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Loading Report in Designer from Viewer

Post 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.
JohnW
Posts: 103
Joined: Mon Nov 20, 2017 8:29 pm

Re: Loading Report in Designer from Viewer

Post 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.
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Loading Report in Designer from Viewer

Post 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.
Post Reply