ActiveReport’s End User Designer (EUD) has always being the star attraction for both developers and end users. The idea of giving the real end users the power to Create or Edit reports and Write Script code, seems to be what has captured the imagination of many customers. They always wanted to take this functionality a step further and use it on the Web as well. Unfortunately, this is where a line needs to be drawn since the EUD is a Windows Form control and therefore cannot be used on the Web. However, there is still a trick that we have up our sleeves. This approach allows developers to incorporate the usage of EUD in their web applications and provide end users the options to create and **edit reports.** Following steps summarizes the implementation for the above approach.
- Let end users to download the EUD executable from a Web Page.
- Ask users to C**r**eate or Edit and Save the report to an Rpx file or Rdlx file..
- Ask users to upload the created Rpx/Rdlx file to the Web Server.
- Now in the Web Application write code to load this Rpx/Rdlx file to an ActiveReports instance and show the report on the WebViewer control.
Code to Load Rpx File to WebViewer Control
SectionReport sr = new SectionReport(); sr.LoadLayout(Server.MapPath("") + "\\\Invoice.RPX); WebViewer1.Report = sr;
Code to Load Rdlx File to WebViewer Control
GrapeCity.ActiveReports.PageReport rpt = new GrapeCity.ActiveReports.PageReport(); rpt.Load(new System.IO.FileInfo(Server.MapPath("")+"\\\invoice.rdlx")); WebViewer1.Report = rpt;