ReportBuilderOptions.AllowMissingMembers

ReportBuilderOptions AllowMissingMembers property. Specifies that missing object members should be treated as null literals by the engine. This option affects only access to instance that is nonstatic object members and extension methods. If this option is not set the engine throws an exception when encounters a missing object member.

ReportBuilderOptions.AllowMissingMembers property

Specifies that missing object members should be treated as null literals by the engine. This option affects only access to instance (that is, non-static) object members and extension methods. If this option is not set, the engine throws an exception when encounters a missing object member.

public bool AllowMissingMembers { get; set; }

Examples

Shows how to fill template with data from CSV data source loaded from file using LINQ Reporting engine.

CsvDataLoadOptions csvLoadOptions = new CsvDataLoadOptions();
csvLoadOptions.QuoteChar = '\'';
csvLoadOptions.CommentChar = '|';
csvLoadOptions.Delimiter = ',';
csvLoadOptions.HasHeaders = true;
CsvDataSource ds = new CsvDataSource(MyDir + "ReportingData.csv", csvLoadOptions);

ReportBuilderOptions reportBuilderOptions = new ReportBuilderOptions();
reportBuilderOptions.AllowMissingMembers = true;

using (Stream input = File.OpenRead(MyDir + "ReportingTemplateForeach.docx"))
using (Stream output = File.Create(ArtifactsDir + "ReportingForeachCsvDataSource.pdf"))
{
    ReportBuilder.BuildReport(input, output, SaveFormat.Pdf, ds, "data", reportBuilderOptions);
}

See Also