How can we retrieve the serialized report definition of an unsaved report?

Posted by: triloknathn on 5 October 2026, 6:39 am EST

  • Posted 5 October 2026, 6:39 am EST

    Question: ActiveReports Web Designer – How can we retrieve the serialized report definition of an unsaved report?

    We are using ActiveReports 18.1 Web Designer in an ASP.NET application.

    We are implementing a feature where support users can create a standard dataset using the Web Designer’s normal Dataset dialog and publish that dataset without having to manually create JSON.

    Our current working approach is:

    1. User creates a dataset in the Web Designer.
    2. Report is saved/previewed.
    3. On the server, we load the report using
      IReportStore.LoadReport()
      /
      PageReport
      .
    4. We read the
      DataSet
      object and extract:
      • Data source
      • Query / CommandType
      • Query parameters
      • Fields
      • Calculated fields
      • Filters
      • Dataset options
    5. We convert this into our standard dataset definition.

    We would like to avoid requiring the user to save or preview the report just to publish the dataset.

    We found the Web Designer’s:

    documents.handlers.onDocumentChanged
    

    event, which provides the current

    document
    object even when the report has not been saved.

    The document contains the dataset information we need, for example:

    {
      "DataSets": [
        {
          "Name": "DataSet1",
          "Fields": [
            {
              "Name": "DATASETNAME",
              "DataField": "DATASETNAME"
            }
          ],
          "Query": {
            "DataSourceName": "DataSource1",
            "CommandType": "Text",
            "CommandText": "SELECT ... WHERE PERIODSEQUENCE > @MinSeq",
            "QueryParameters": [
              {
                "Name": "@MinSeq",
                "Value": "0"
              }
            ]
          },
          "Filters": [
            ...
          ],
          "$calculatedFields": [
            ...
          ]
        }
      ]
    }
    

    However, this appears to be the Web Designer’s internal document model, rather than the serialized report JSON format.

    We tried passing the complete

    document
    directly to:

    ReportJsonSerializer.Deserialize(documentJson)
    

    but it fails with a

    JsonException
    .

    Our question

    Is there a supported ActiveReports 18.1 API that allows us to obtain the serialized/server-side report definition from the current unsaved Web Designer document?

    Specifically, we are looking for something equivalent to the internal conversion the Web Designer performs before Save/Preview, but exposed through a public/supported API.

    We would like to avoid:

    • Reimplementing the Web Designer’s internal
      serializeDocument
      logic ourselves.
    • Depending on undocumented properties of the
      onDocumentChanged
      document.
    • Building a solution that could break with a future ActiveReports upgrade.

    If there is no supported API for this in ActiveReports 18.1, could you please confirm that the recommended approach is to save the report first and then load it through the report store?

    Any guidance on the supported API or recommended architecture would be greatly appreciated.

  • Posted 6 October 2026, 5:12 am EST

    Hi Triloknath,

    Unfortunately, there’s no direct way to export the report’s DataSet definition JSON. However, you can add a custom button to your designer that’ll internally save the report as a temporary report, extract its DataSet schema, download it as JSON and remove the temporary report to achieve your requirement of only extracting the DataSet schema.

    Please find attached a sample implementing the same for your reference.

    Regards,

    Anand

    WebDesigner_MVC_Core.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels