DataWeb
Search Results for

    Show / Hide Table of Contents

    Class ModuleReport

    Represents a module that handles the generation and processing of reports within a section.

    Inheritance
    object
    Module
    ModuleReport
    ModuleResourceReport
    ModuleSubscriberReport
    Inherited Members
    Module.section
    Module.navigationContext
    Module.serviceProvider
    Module.ValidateAsync(Item, Dictionary<string, object>, CancellationToken)
    Module.SaveAsync(Item, Dictionary<string, object>, CancellationToken)
    Module.IsCompletedAsync(Item, Section, CancellationToken)
    Module.CloneAsync(Item, Item, CancellationToken)
    Module.GetProvidedValues(Dictionary<string, object>)
    Module.GetSectionNotificationCountAsync(CancellationToken)
    Module.GetActionsAsync(CancellationToken)
    Module.ProcessActionAsync(ContextAction, IUser, List<string>, List<Form.ProvidedValue>, NavigationContext, CancellationToken)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: DataWeb.Structure.Modules
    Assembly: DataWeb.Core.dll
    Syntax
    public class ModuleReport : Module
    Remarks

    This class provides methods for validating report data, retrieving report metadata (e.g., name and content type), and processing the report to generate its content as a stream. It integrates with the form service for validation and ensures that the report adheres to the specified structure and format.

    Constructors

    ModuleReport(Section, NavigationContext, IServiceProvider)

    Represents a module that handles the generation and processing of reports within a section.

    Declaration
    public ModuleReport(Section section, NavigationContext navigationContext, IServiceProvider serviceProvider)
    Parameters
    Type Name Description
    Section section
    NavigationContext navigationContext
    IServiceProvider serviceProvider
    Remarks

    This class provides methods for validating report data, retrieving report metadata (e.g., name and content type), and processing the report to generate its content as a stream. It integrates with the form service for validation and ensures that the report adheres to the specified structure and format.

    Methods

    GetContentTypeAsync(Item, Dictionary<string, object>, CancellationToken)

    Retrieves the content type of the report to be generated.

    Declaration
    public virtual Task<string> GetContentTypeAsync(Item item, Dictionary<string, object> moduleData, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    Item item

    The item for which the report content type is being retrieved.

    Dictionary<string, object> moduleData

    The data associated with the report generation.

    CancellationToken cancellationToken

    Token to cancel the asynchronous operation.

    Returns
    Type Description
    Task<string>

    A task that represents the asynchronous operation. The task result contains the MIME type of the report content.

    GetReportNameAsync(Item, Dictionary<string, object>, CancellationToken)

    Retrieves the name of the report to be generated.

    Declaration
    public virtual Task<string> GetReportNameAsync(Item item, Dictionary<string, object> moduleData, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    Item item

    The item for which the report name is being retrieved.

    Dictionary<string, object> moduleData

    The data associated with the report generation.

    CancellationToken cancellationToken

    Token to cancel the asynchronous operation.

    Returns
    Type Description
    Task<string>

    A task that represents the asynchronous operation. The task result contains the name of the report file.

    ProcessReportAsync(Item, Dictionary<string, object>, CancellationToken)

    Processes the report and generates the report content as a stream.

    Declaration
    public virtual Task<Stream> ProcessReportAsync(Item item, Dictionary<string, object> moduleData, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    Item item

    The item for which the report is being generated.

    Dictionary<string, object> moduleData

    The data associated with the report generation.

    CancellationToken cancellationToken

    Token to cancel the asynchronous operation.

    Returns
    Type Description
    Task<Stream>

    A task that represents the asynchronous operation. The task result contains the report content as a stream.

    ValidateReportDataAsync(Item, Dictionary<string, object>, CancellationToken)

    Validates the data required to generate the report for a specific item.

    Declaration
    public virtual Task<List<ValidationError>> ValidateReportDataAsync(Item item, Dictionary<string, object> moduleData, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    Item item

    The item for which the report data is being validated.

    Dictionary<string, object> moduleData

    The data to validate for the report.

    CancellationToken cancellationToken

    Token to cancel the asynchronous operation.

    Returns
    Type Description
    Task<List<ValidationError>>

    A task that represents the asynchronous operation. The task result contains a list of validation errors.

    In this article
    Back to top Generated by DocFX