<< Click to Display Table of Contents >>

Dynamic dataset design

Dynamic query

Dynamic Query is a query that some part of the statement such as field definitions is to be determined dynamically at runtime. This is used when it is not allowed to determine fields specification at design time as the fields dynamically change. Dynamic query also enables the end user to manually select the fields and conditions of the query to run.

Dynamic dataset

Dynamic dataset is a 2nd dataset which is made from data sources of database, UDS, FILE/HTTP or  XML DTD Store to allow the user to create Dynamic Query Reports.

Instead of storing fields information of the dynamic query, Dynamic Data set stores all query results with three attributes ROWIDX, COLUMN and VALUE. At run time, dynamic field information is retrieved from these three attributes and constructs the dynamic query.

Therefore, the user can design a report using these three attributes of Dynamic Data set, and make the report to be expanded with dynamically created query results at runtime.

The definition of three attributes of Dynamic Data set is as follows:

ROWIDX

Row index on the dataset

COLUMN

Field name in the dataset

VALUE

Value of the field

For example, The dynamic data set "table2" for the source data set "table1" have three fields of ROWIDX, COLUMN, VALUE. All fields of all rows are saved in the dynamic dataset "table2"

table1 – table for the source dataset

Region

Sales2000

Sales2001

Canada

157000

890235

East

5234991

5432123

Middle West

1234789

1123454

South

4563300

4992100

West

3551090

3901234

table2 – table for the dynamic dataset

ROWIDX

COLUMN

VALUE

0

Region

Canada

0

Sales2000

257000

0

Sales2001

890235

1

Region

East

1

Sales2000

5234991

1

Sales2001

5432123

2

Region

Middle West

2

Sales2000

1234789

2

Sales2001

1123454

3

Region

South

3

Sales2000

4563300

3

Sales2001

4992100

4

Region

West

4

Sales2000

3551090

4

Sales2002

3901234

Add dynamic dataset

1.Select [Add Store] from the right mouse click popup menu on the [DATABASE] in the data window. Add database store using the Add Database Connection Information dialog.

2.Select [Add Dynamic Dataset] from the right mouse click popup menu on the database store you have created.

3.Enter Dynamic dataset name and Starting row number in the Add Dynamic Dataset dialog.

4.Design the query using the query window in the Designer Mode or Manual mode.

5.Run the query by selecting [Run] > [Run Query] from the menubar or clicking the [Run Query icon] on the toolbar and check fields information of the dynamic dataset.