An ad hoc dataview is a simplified representation of a complex database, which can be used as a data source for ad hoc reporting. It offers a simple list of columns that can be used in an ad hoc report instead of a large number of tables which need to be joined by certain columns. An end user does not have to know the structure of a database and can dive into ad hoc reporting.
In addition to pure data there is the possibility to set special formats, like number format or options like "Can Grow" or "Keep Together" to each column. To make an ad hoc data view available for ad hoc reporting, just copy the created *.dataview file into the root ad hoc template directory of your ad hoc report server (this directory can be configured via the Ad Hoc Settings in the Configuration Manager).
To create a new ad hoc data view choose the menu item "File | New Ad Hoc Data View..." of the i-net Designer. The ad hoc data view editor opens with an empty data source. It consists of an input field for title, a field for a description and a table of the ad hoc data view fields (currently empty). The buttons below will become active once you added fields and selected one of them.
Before adding a field to the ad hoc data view you have to connect the ad hoc data view to a data source. This is similar to the creation of a database connection for a new report. Start the Database Wizard and click on the button "New Connection...". After you have selected the data source, you can add tables to the ad hoc data view and join them if needed.
After adding one or more tables to the ad hoc data view you can close the "Database Wizard" and the field browser on the left side of the i-net Designer will be updated with the newly available database fields.
Note: A data view can also make use of the record selection formula to filter the results of the database query. Therefore choose "Record Selection Filter" from the report menu and enter a formula to perform the filter operation. This record selection formula will be applied to all ad hoc reports, which will use this dataview.
An ad hoc data view can contain database, formula, parameter, and SQL expression fields.
To add a field to the ad hoc data view, select the field from the field browser of the designer and and drag it over to the table of the ad hoc data view editor. The table will show a new row with information (such as field type, value type, name, and alias) about the field you've added. You can add more fields by selecting another field in the fields browser and dragging it again. Fields can only be added once to the ad hoc data view.
To remove a field from the ad hoc data view, just select the row in the table of the ad hoc data view editor and click on the delete symbol on the right side of the row. You can also use the delete key or choose delete from the designer's edit menu.
The order of the fields in the ad hoc data view can be changed by using the up and down buttons below the table. Select a row and press one of these buttons to reorder the fields. You can also use keyboard shortcuts (alt + up / alt + down) or the context menu to move the fields.
The properties of a field can be set by pressing the properties button below the table. Once the fields of the ad hoc data view are arranged, you can type in a title and description and save the ad hoc data view.
Loading and saving is alike to a regular report file. The only difference is the file extension which is ".dataview" in the case of an ad hoc dataview. By opening an existing dataview the designer automatically decides which editor to present.