You can easily save and load a view definition (*.olapx) file, saving the view definition at run time and loading the definition at design time or run time.
- Create an OLAP screen using the template. Specify a data source.
- Run the application and open the screen. The field list is populated.
- Customize the fields and set menu options as desired. Use the Save button on the toolbar to save the view to a file.
- Close the application and open the screen in the designer. Select the C1OlapPage control.
-
Select the Load View Definition link to load the file you previously saved.
- Run the application again. C1OlapPage will be initialized with your settings. Note that the view definition file can be deleted. The settings are saved in the LightSwitch project; they are not re-read from the file at runtime.