ActiveReports 18 .NET Edition
Developers / Work with Reports using Code / Section Report / Work with Code-based Section Reports / Design Code-based Section Reports in .NET Core
In This Topic
    Design Code-based Section Reports in .NET Core
    In This Topic

    The existing limitation in .NET Core 3.1 and above does not allow the ActiveReports Integrated Designer to be used for designing Code-based Section Reports in WinForms applications in Visual Studio.
    As a workaround, you need to use the Visual Studio's option to link report files from the .NET Core project into the .NET Framework project and use the .NET Framework WinForms Designer.

    The steps to enable design-time report creation in .NET Core project for Code-Based Section Reports are as follows:

    1. Create a new Windows Forms .NET Core project.


      Create a new project window

      Configure your new project dialog
    2. Select the Target Framework as 'NET 8.0' and select Create.
      Solution Explorer
         
    3. Add a new .NET Framework project and the built-in Section Report (code-based) item template.

      1. In the Solution Explorer, right-click the solution node, go to AddNew Project, and configure the project for the target .NET Framework version.

        Add WinForms .Net FW Project
      2. Add the code-based Section Report item to the .NET Framework project. To do so, right-click the .NET Framework project and go to Add > New Item.

        Add new item to project
      3. Select the ActiveReports 18 Code-Based Report report item. All the required dependencies will be installed automatically for this project.
         
        Select code-based section report template
      4. Use cut-paste to move the report (SectionReport1.cs) from the .NET Framework project to .NET Core project. Ensure that the report from the .NET Framework project is deleted.          
                               
    4. Add a report from the .NET Core project to the .NET Framework project as a link.

      1. In the Solution Explorer, right-click the .NET Framework project, go to Add > Add Existing Item.
      2. Navigate to the .NET Core project and select report file: 'SectionReport1.cs'.
      3. Select the Add As Link option to add the report files as link.
        Solution Explorer

        added section report

    5. Double-click the linked SectionReport1.cs (in the .Net Framework project) to open the ActiveReports Integrated Designer for the report.

      added section report
    6. Now design the report. You will observe that the modification of a report in the .NET Framework project leads to the modification of a report in the .NET Core project.