/* i-net software provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This programming example assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. i-net software support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. © i-net software 1998-2013 */ using System.Windows.Forms; using Inet.Viewer.Data; namespace Inet.Viewer { /// /// enum to distinguish the different export formats /// public enum ExportFormat { /// /// PDF /// PDF, /// /// Export Format XLS (Microsoft Excel format) /// XLS, /// /// Open Document Spreadsheet(ODS) /// ODS, /// /// RTF /// RTF, /// /// HTML /// HTML, /// /// Export Format CSV (Comma separated values) /// CSV, /// /// Export Format DATA (Comma separated values) /// DATA, /// /// Export Format TXT (Plain Text Format) /// TXT, /// /// JPG Iamges /// JPG, /// /// PNG Images /// PNG, /// /// GIF Images /// GIF, /// /// PostScript Level 1 /// PS, /// /// PostScript Level 2 /// PS2, /// /// PostScript Level 3 /// PS3, /// /// XML /// XML, /// /// Bitmap Images /// BMP, /// /// Scalable Vector Graphics /// SVG, /// /// Option for no export format /// None } /// /// This is the top level viewer instance of the i-net Clear Reports report viewer, and allows /// creation, retrieval, and removal of one or more ReportViews. /// To create a ReportView, a ReportData object is necessary, in order for the ReportView to be /// able to fetch its report data. /// This class also holds the toolbar which can be used to fire actions, add or remove buttons. /// public interface IReportViewer { /// /// Returns the currently visible or selected ReportView object. Note that this will /// return null if no ReportView is currently visible or selected. /// /// Currently active ReportView, or null if none is currently active IReportView CurrentReportView { get; set; } /// /// Returns the number of ReportViews registered and added to this viewer. The return value -1 is the maximum /// allowed index for . /// /// The number of ReportViews held by the ReportViewer int ReportViewCount { get; } /// /// Returns the report view at the given index. Note this report view need not be the current report view /// or even visible. The maximum allowed index is getReportViewCount()-1, the minimum allowed is 0. /// /// Index of report view to fetch. /// ReportView at the index given /// If index is smaller than 0 or is greater than or equal to getReportViewCount(). IReportView GetReportView(int i); /// /// Returns the current ToolBar - this tool bar belongs to the currently visible or /// selected ReportView object. This object is responsible for various user actions for /// navigating through the report, printing, etc. /// /// ToolBar of current ReportView IToolBar ToolBar { get; } /// /// Adds a given ReportView to the ReportViewer - this ReportView need not be /// initialized at this point in time.
/// Note that as long as the viewer exists, this report view will be held in memory, unless it is /// removed via or . In this case, it can not be added /// back to the viewer via this method. Instead it must be recreated with the .
/// Note also that the report view will not have a close button if it is the first report view added /// to the viewer, otherwise it will. If you'd like to customize this behavior, use the method /// instead, where you can manually set whether or not the view /// is to have a close button. ///
/// ReportView to add /// /// /// /// /// or or . void AddReportView(IReportView view); /// /// Also adds this newly created ReportView to the ReportViewer.
/// Note that as long as the viewer exists, this report view will be held in memory, unless it is /// removed via or . In this case, it can not be added /// back to the Viewer via this method. Instead it must be recreated with the ReportData.
/// Note also that the report view will not have a close button if it is the first report view added /// to the viewer, otherwise it will. If you'd like to customize this behavior, use the method /// is to have a close button. ///
If a report with precisely the same properties has already been added, this will not create an identical /// second view, rather it will give focus to the view already opened. If you want to add two identical reports to the /// same viewer, simply add an identifying property to the report views, such as a time stamp.
/// ReportData object specifying the source of report data /// Newly created ReportView - this ReportView has now been added to a ReportViewer and should not /// simply be added somewhere else without first removing it from the viewer. /// /// /// /// /// if this view has previously been removed. IReportView AddNewReportView(IRenderData data); /// /// Permanently closes and removes the ReportView at the given index, 0-based. That is, closeReportView(0) /// will close and remove the first ReportView added to the Viewer, closeReportView(1) the second, etc. /// This will also close any currently open connections to the ReportView's ReportData object. /// Note that this causes the report view to be disposed of - trying to add it back to the viewer /// via will result in an IllegalStateException. Instead /// simply create a new report view with the same ReportData. /// /// If there is no ReportView at this index, this method will throw a ViewerException. /// /// Index of ReportView to close and remove. void CloseReportView(int index); /// /// Permanently closes and disposes the ReportView given as the parameter and removes it from the ReportViewer. /// This will also close any currently open connections to the ReportView's ReportData object. /// Note that this causes the report view to be disposed of - trying to add it back to the viewer /// via will result in an IllegalStateException. Instead /// simply create a new report view with the same ReportData. /// /// ReportView to close and remove from the ReportViewer void CloseReportView(IReportView view); /// /// Closes and removes all ReportViews that are currently added to the ReportViewer. /// This will also close any currently open connections to the various ReportData objects to /// which the ReportViews are connected. /// Note that this causes the report views to be disposed of - trying to add one of them back to the viewer /// via will result in an IllegalStateException. Instead /// simply create a new report view with the same ReportData. /// void CloseAllReportViews(); /// /// Event Listener for if the current View changes /// event System.EventHandler ViewChanged; /// /// Shows or hides to search panel. /// bool SearchVisible { set; } /// /// Gets the printer settings. /// System.Drawing.Printing.PrinterSettings PrinterSettings { get; } } }