public FileSystemReportDefinition() : base() { // Set the default name for this report in the header section ExportSection headerSection = GetReportSection(ExportSection.eSectionType.header); headerSection.FormattedText.RawText = "Files Report"; // _name = "Files Report"; _reportType = eReportType.filesystem; _showBasicInformation = true; _showDateInformation = false; _showVersionInformation = false; _filterFile = ""; // Initialize the data set _reportDataSet.DataSetName = "filesDataSet"; }
public LicensingReportDefinition() : base() { // Set the default name for this report in the header section ExportSection headerSection = GetReportSection(ExportSection.eSectionType.header); headerSection.FormattedText.RawText = "Application Licensing Report"; // _name = "Application Licensing Report"; _reportType = eReportType.licensing; _showLicenses = true; _showInstanceDetails = true; // Initialize the data set _reportDataSet.DataSetName = "licensingDataSet"; // Create the tables, columns and relationships CreateTables(); }
/// <summary> /// We have parsed the 'Report Sections' element so now parse the items /// within this section noting that we terminate parsing when we reach the end /// of the section. /// </summary> /// <param name="xmlElement"></param> protected void ReadReportSections(XmlSimpleElement xmlSimpleElement) { foreach (XmlSimpleElement childElement in xmlSimpleElement.ChildElements) { switch (childElement.TagName) { // For each section we create a new section and ask it to populate itself case S_REPORT_SECTION: ExportSection reportSection = new ExportSection(); reportSection.LoadFromXml(childElement); _listReportSections.Add(reportSection); break; default: break; } } }
public InternetReportDefinition() : base() { // Set the default name for this report in the header section ExportSection headerSection = GetReportSection(ExportSection.eSectionType.header); headerSection.FormattedText.RawText = "Internet Usage Report"; // _name = "Internet Usage Report"; _reportType = eReportType.internet; _showAllDates = true; _startDate = new DateTime(0); _endDate = new DateTime(0); _filterURL = ""; // Initialize the data set _reportDataSet.DataSetName = "internetDataSet"; // Create the tables, columns and relationships CreateTables(); }
public ReportDefinition() { _name = ""; _description = ""; _author = System.Environment.UserName; _createdDate = DateTime.Now; _selectedAssets = ""; _selectedGroups = ""; _hasChanged = false; _readFromFile = false; _ignoreChildAssets = true; // Build the list of report sections - every report will have a header, subheader and footer ExportSection headerSection = new ExportSection(ExportSection.eSectionType.header, new FormattedText()); headerSection.FormattedText.ForeColor = Color.DarkBlue; headerSection.FormattedText.FontData.Bold = Infragistics.Win.DefaultableBoolean.True; headerSection.FormattedText.FontData.Name = "Verdana"; headerSection.FormattedText.FontData.SizeInPoints = 10; headerSection.FormattedText.HorizontalAlignment = Infragistics.Win.HAlign.Center; // Set the subheading to show the Date, Author and Copyright ExportSection subheadingSection = new ExportSection(ExportSection.eSectionType.subheader , new FormattedText(defaultSubHeading)); subheadingSection.FormattedText.FontData.Underline = Infragistics.Win.DefaultableBoolean.True; subheadingSection.FormattedText.FontData.Name = "Verdana"; subheadingSection.FormattedText.FontData.SizeInPoints = 8; // Default footer ExportSection footerSection = new ExportSection(ExportSection.eSectionType.footer , new FormattedText(defaultFooter)); footerSection.FormattedText.FontData.Name = "Verdana"; footerSection.FormattedText.FontData.SizeInPoints = 6; // Add these sections _listReportSections.Clear(); _listReportSections.AddRange(new ExportSection[] { headerSection, subheadingSection, footerSection }); }
/// <summary> /// Create an Infragistics style based on the criteria specified within the ExportSection object /// </summary> /// <param name="section"></param> /// <returns></returns> protected static Infragistics.Documents.Reports.Report.Text.Style CreateStyle(ExportSection section) { // Create the font which we shall use for the header Infragistics.Documents.Reports.Graphics.Font headerFont = new Infragistics.Documents.Reports.Graphics.Font(section.FormattedText.FontData.Name, section.FormattedText.FontData.SizeInPoints); headerFont.Underline = (section.FormattedText.FontData.Underline == Infragistics.Win.DefaultableBoolean.True) ? true : false; headerFont.Bold = (section.FormattedText.FontData.Bold == Infragistics.Win.DefaultableBoolean.True) ? true : false; // Create a style based on this Infragistics.Documents.Reports.Graphics.Color infColor = new Color(section.FormattedText.ForeColor); Infragistics.Documents.Reports.Graphics.SolidColorBrush Brush = new Infragistics.Documents.Reports.Graphics.SolidColorBrush(infColor); Infragistics.Documents.Reports.Report.Text.Style newStyle = new Infragistics.Documents.Reports.Report.Text.Style(headerFont, Brush); //Infragistics.Documents.Reports.Report.Text.Style newStyle = new Infragistics.Documents.Reports.Report.Text.Style(headerFont, Infragistics.Documents.Reports.Graphics.Brushes.DeepPink); // ..and return it return(newStyle); }
/// <summary> /// Called to format an exportable section of the report /// </summary> /// <param name="exportFooterSection"></param> /// <param name="section"></param> protected static void FormatExportSection(Infragistics.Documents.Reports.Report.Text.IText sectionText, ExportSection formatSection) { // Format the section // Horizontal Alignment if (formatSection.FormattedText.HorizontalAlignment == Infragistics.Win.HAlign.Center) { sectionText.Alignment.Horizontal = Alignment.Center; } else if (formatSection.FormattedText.HorizontalAlignment == Infragistics.Win.HAlign.Left) { sectionText.Alignment.Horizontal = Alignment.Left; } else { sectionText.Alignment.Horizontal = Alignment.Right; } // Vertical Alignment if (formatSection.FormattedText.VerticalAlignment == Infragistics.Win.VAlign.Top) { sectionText.Alignment.Vertical = Alignment.Top; } else if (formatSection.FormattedText.VerticalAlignment == Infragistics.Win.VAlign.Bottom) { sectionText.Alignment.Horizontal = Alignment.Bottom; } else { sectionText.Alignment.Horizontal = Alignment.Middle; } // Create a style based on the settings sectionText.Style = CreateStyle(formatSection); // Set the text sectionText.AddContent(formatSection.FormattedText.GetFormattedText); }