Report inheritance in Fast Report Online Designer

Hello,

I've tried to open a report that inherits from another using Fast Report Online Designer, but I couldn't manage to get it working.

The reports I used are the ones on this github repository https://github.com/FastReports/FastReport/tree/master/Demos/Reports, the Inherited Report - base.frx and Inherited Report.frx.

The code I used is the following:

[HttpGet]

[Route("getReport")]

[Consumes(MediaTypeNames.Application.Json)]

public async Task<IActionResult> GetReport()

{

           try

           {

               WebReport webReport = new WebReport();

               webReport.Width = "1000";

               webReport.Height = "1000";

               string reportPath = Path.Combine(_hostEnvironment.ContentRootPath, "App_data", "Inherited Report.frx");

               string dataPath = Path.Combine(_hostEnvironment.ContentRootPath, "App_data", "nwind-employees.xml");

               string baseReportPath = Path.Combine(_hostEnvironment.ContentRootPath, "App_data", "Inherited Report - base.frx");

               webReport.Report.BaseReportAbsolutePath = baseReportPath;

               //webReport.Report.BaseReport = "Inherited Report - base.frx";


               DataSet dataSet = new DataSet();

               dataSet.ReadXml(dataPath);

               webReport.Report.RegisterData(dataSet, "NorthWind");

               webReport.Report.Load(reportPath);


               webReport.Mode = WebReportMode.Designer; // Set the web report object mode - designer display

               webReport.DesignerLocale = "es";

               webReport.DesignerPath = "/WebReportDesigner/index.html"; // Specify the URL of the online designer

               webReport.DesignerSaveCallBack = "/fr/SaveDesignedReport"; // Set the view URL for the report save method

               webReport.Debug = true;

               ViewBag.WebReport = webReport; // pass the report to View

               return View("~/Views/FastReport/ReportDesigner.cshtml");

           }

           catch (Exception e)

           {

               return Ok();

           }

       }


And when I open the designer it shows the following error:

If I open another report without inheritance it works fine.

So my question is: How can we set a base report in Fast Report Online Designer and How can I create a base report?

Thanks!

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.