|
|
|||
Home Products Downloads Registered users Support Prices Order Primary Subscription |
|
||
Sample #2 - Transferring all rows of a datasourceSee QuickStart.cs and QuickStart.xls Rule #4 - Transferring all rows of a datasource Rule #5 - Preparing a list range Components and their propertiesSee QuickStart.cs. To reproduce this sample form you add a Windows form to your project and paste onto it all the components from the first form. Then, from the Toolbox drag an OleDbCommand component and set its properties: OleDbCommand2 properties:
Connection = oleDbConnection1; CommandText = SELECT orders.* FROM orders dataSet1 properties:
add a column to the Customers table and set its properties:
ColumnName=CustNo;
add another table and set its properties:
DataType=System.Double;
Name=ordersTable;
add a column to the Orders table and set its properties:
TableName=Orders;
ColumnName=CustNo;
add a relation
DataType=System.Double;
Name=Relation1
ParentTable=Customers ChildTable=Orders Key Columns = CustNo Foreign Key Columns = CustNo xlReport1 properties:
add another datasource and set its properties:
Name = xlrDatasource2
Alias = Orders Command=OleDbCommand2; DataSource = dataSet1; DataMember =Customers.Relation1; Range= OrdersRange; TemplateSee QuickStart.xls. Pay attention to the following rules we used in developing both sample form and sample template. These rules help you to transfer all the rows of a given datasource to a report. At the figure below you see the list range prepared and selected in Excel window. ![]() Small notes. A list range in XL Report is a list in Excel. XL Report expects to find options specifying additional parameters of report generation in the option row and option column. This approach allows modifying (and sometimes significantly modifying) the report without rebuilding your application. Some of the options are shown in this section. To know more about options available, please refer to below. XL Report allows using arbitrary ranges that don't comply with the definition of a relational table. To know more about arbitrary ranges, please refer to Developer's Guide. ReportSelect xlReport1 and click the Preview command. Excel starts with the new unsaved workbook with your report. ![]() |
Components
Data Access methods
Excel version supportedMS Excel 97 (SR2)
[ Download it ] |