Datasets are a way to create a complex select and reference the results of that select as a mini-data source or sub-data source. Making a dataset is essentially making and using a POD (portable object doclet).
- In the case of SQL, it is equivalent to creating a view and the dataset is a table, but generally a table composed of columns joined from multiple tables in the underlying data source.
- In the case of XML it is a DOM of the sub-set of the XML file returned by the XPath that defines the dataset.
The easy way to define datasets is as follows:
- Define the dataset(s) in AutoTag. A single data source can have multiple datasets.
- Add the data source containing the datasets to a POD file.
- Pass that POD file when creating a data source object when calling the engine.
Please keep in mind the following. The datasets you define in AutoTag are stored in the template and are used by AutoTag only. They are not recognized by the engine. (When AutoTag runs a report, it explicitly passes the datasets to the engine.)
The datasets defined in the POD file are used by the engine, but are not used by AutoTag. AutoTag writes them to the POD file, but does not reference the POD file after writing it (unless you later use that POD file to place a data source in a template).
To Create Datasets:
1. Click the Data Sources menu item in the AutoTag Manager menu and then...
2. Click the Datasets button in the Data Sources window.
Please note that the Datasets window actually is used for two purposes.
The first is to select what elements in the data source are displayed to the user. If you uncheck the box next to an element, it will not be displayed in the data source metadata or wizard. It still can be used in a select, it just isn't displayed.
The second is to create, edit, & delete datasets.
Creating the POD (.rdlx) file:
Once you have created the datasets, the next step is to place this in a POD file so you can pass the datasets to the engine. If you do not do this, then the engine will throw an exception when it finds a dataset in a select as it will not know how to evaluate it.
You are not adding dataset(s) to the POD file, you are adding data source(s). A data source is added with all of its datasets. A dataset cannot exist independent of its parent data source. To do this go to the AutoTag Manager menu and select Create Pods, Data sources. And then select the data sources you wish to add. We are adding both SQL and chart because those are the data sources used in the SQL and XML example.
You now have the POD file to pass to the reporting engine. For more information on this, please go to the engine wiki.
The Hard Way
And the hard way to do this? Create the POD file yourself, then have AutoTag use that as its data source for a template.