IDwMeta.Reports Property
.NET Standard 2.x
Gets the properties for the Reports defined in the DataWindow object.
Namespace: DWNet.Data
Assembly: DWNet.Data.dll
Syntax
IMetaList<IReportMeta> Reports { get; }
Return
DWNet.Data.IMetaList<IReportMeta>
Returns the properties for the Reports defined in the DataWindow object.
Examples
The following code example demonstrates how to use the Reports property.
using Appeon.ApiDoc.Models;
using DWNet.Data;
using System;
using System.Collections.Generic;
namespace Appeon.ApiDoc.IDwMetaExamples
{
    public class ReportsExample
    {
        private readonly SchoolContext _context;
        public ReportsExample(SchoolContext dataContext)
        {
            // Sets the data context
            _context = dataContext;
        }
        public void Example()
        {
            // Instantiates datastore with datawindow: d_department_with_report
            var datastore = new DataStore("d_department_with_report", _context);
            datastore.Retrieve();
            // Gets the model embedded in the DataStore.
            var reportMetas = datastore.DwMeta.Reports;
            Console.WriteLine("Reports Count: {0}", reportMetas.Count);
            foreach (var item in reportMetas)
            {
                foreach (string argsItem in item.Nest_Arguments)
                {
                    Console.WriteLine("DataObject: {0}; Name: {1}; Nest_Argument: {2}",
                       item.DataObject, item.Name, argsItem);
                }
            }
            // Gets the nested report of the first row.
            var reports = datastore.GetItem<IList<D_Course_With_Param>>(0, "dw_1");
            Console.WriteLine("First row report count: {0}", reports.Count);
            /*This code produces the following output:
            
            Reports Count: 1
            DataObject: d_course_with_param; Name: Dw_1; Nest_Argument: departmentid
            First row report count: 2
            */
        }
    }
}
Example Refer To
Model Class: D_Department_With_Report 
DataWindow File: d_department_with_report 
Applies to
.NET Standard
2.x