The TXTextControl.DocumentServer namespace TX Text Control .NET for Windows Forms
DocumentServer Namespace
TXTextControl.DocumentServer Namespace
encapsulates the Text Control reporting functionality, the TXTextControl.DocumentServer.Fields.FieldAdapter class TX Text Control .NET for Windows Forms
DocumentServer.Fields Namespace
FieldAdapter Class
The abstract FieldAdapter class is the base class of all special DocumentServer field adapters.
, the TXTextControl.DocumentServer.DataSources.DataSourceManager class TX Text Control .NET for Windows Forms
DocumentServer.DataSources Namespace
DataSourceManager Class
The DataSourceManager class is designed for handling all existing kinds of data sources which can be used together with the MailMerge class.
and also reporting dialog boxes that can be used in your applications.

These dialog boxes are ready-to-use for typical data selection tasks. The following dialog boxes are available:

  • ChartDataRelationDialog
    This dialog is used to set the data relations for charts.

    The following code loads a data source into a new instance of a DataSourceManager and opens a chart data relation dialog for a selected chart frame in TextControl:

    DataSourceManager dsManager = new DataSourceManager();
    dsManager.LoadSingleObject(report);
    TXTextControl.DocumentServer.Windows.Forms.ChartDataRelationDialog dlg =
    new ChartDataRelationDialog(textControl1.Charts.GetItem(), dsManager);
    dlg.ShowDialog();
    view raw data.cs hosted with ❤ by GitHub

    The dialog lets the user select the parent and child tables that define the data relation and two data columns in the child table that are used as the x-axis label text and the actual data.

    ChartDataRelationDialog

  • FilterAndSortDialog
    This dialog is used to specify the filter and sorting settings for a merge block.

    The following code opens an instance of the dialog and passes the TXTextControl.DocumentServer.DataShaping.SortingInstruction class TX Text Control .NET for Windows Forms
    DocumentServer.DataShaping Namespace
    SortingInstruction Class
    The SortingInstruction class contains merge block data sorting information such as the sort order and the column name to sort the data rows after.
    list to the TXTextControl.DocumentServer.DataSources.MergeBlockInfo class TX Text Control .NET for Windows Forms
    DocumentServer.DataSources Namespace
    MergeBlockInfo Class
    The MergeBlockInfo class is used to insert a table or paragraph based repeating merge block into a TextControl instance using the DataSourceManager.InsertMergeBlock method.
    :

    DataSourceManager dsManager = new DataSourceManager();
    dsManager.LoadSingleObject(report);
    FilterAndSortDialog filterSortDialog = new FilterAndSortDialog(dsManager.MasterDataTableInfo);
    filterSortDialog.ShowDialog();
    MergeBlockInfo mergeBlockInfo = new MergeBlockInfo("TableName");
    mergeBlockInfo.SortingInstructions = filterSortDialog.SortingInstructions.ToList();
    view raw data.cs hosted with ❤ by GitHub

    FilterAndSortDialog

  • DatabaseConnectionDialog
    This dialog allows the user to build connection strings and to connect to specific data sources.

    The following code opens an instance of the dialog. The connection string is applied to the DataSourceManager:

    DataSourceManager dsManager = new DataSourceManager();
    dsManager.LoadSingleObject(report);
    TXTextControl.DocumentServer.Windows.Forms.DatabaseConnectionDialog dlg =
    new DatabaseConnectionDialog(dsManager);
    dlg.ShowDialog();
    view raw data.cs hosted with ❤ by GitHub

    DatabaseConnectionDialog

  • DataSourceExtractionDialog
    This dialog allows the user to save an excerpt from the currently loaded data source. An upper limit of extracted data rows can be specified in the dialog.

    The following code opens an instance of the dialog. The dialog returns the filename, the maximum number of exported rows and the selected DataTable:

    DataSourceManager dsManager = new DataSourceManager();
    dsManager.LoadSingleObject(report);
    TXTextControl.DocumentServer.Windows.Forms.DataSourceExtractionDialog dlg =
    new DataSourceExtractionDialog(dsManager);
    dlg.ShowDialog();
    var fileName = dlg.FileName;
    var maxRows = dlg.MaxRows;
    var selectedTable = dlg.SelectedTable;
    view raw data.cs hosted with ❤ by GitHub
  • EditDataRelationsDialog
    This dialog allows the user to add or remove data relations to or from the current data source.

    The following code opens an instance of the dialog. The relations are applied to the connected DataSourceManager automatically:

    DataSourceManager dsManager = new DataSourceManager();
    dsManager.LoadXmlFile("sample_db.xml");
    TXTextControl.DocumentServer.Windows.Forms.EditDataRelationsDialog dlg =
    new EditDataRelationsDialog(dsManager);
    dlg.ShowDialog();
    view raw data.cs hosted with ❤ by GitHub

    EditDataRelationsDialog

  • EditMergeBlocksDialog
    This dialog allows the user to remove or rename merge blocks contained in the current document.

    The following code opens an instance of the dialog with a connected TextControl instance that has merge blocks added to a document:

    DataSourceManager dsManager = new DataSourceManager();
    dsManager.LoadSingleObject(report);
    TXTextControl.DocumentServer.Windows.Forms.EditMergeBlocksDialog dlg =
    new EditMergeBlocksDialog(dsManager, textControl1);
    dlg.ShowDialog();
    view raw data.cs hosted with ❤ by GitHub

    EditMergeBlocksDialog

  • InsertMergeBlockDialog
    This dialog allows the user to design and insert a merge block based on the currently selected master table. It is inserted at the current input position of a given TextControl instance.

    The following code opens an instance of the dialog with a connected TextControl instance and the selected DataTableInfo object:

    DataSourceManager dsManager = new DataSourceManager();
    dsManager.LoadSingleObject(report);
    TXTextControl.DocumentServer.Windows.Forms.InsertMergeBlockDialog dlg =
    new InsertMergeBlockDialog(dsManager, textControl1, dsManager.DataTables["Products"]);
    dlg.ShowDialog();
    view raw data.cs hosted with ❤ by GitHub

    InsertMergeBlockDialog

Text Control comes with out-of-the-box UI elements to create powerful reporting applications. At the same time, it is completely customizable and programmable.