Replied 3 August 2017, 3:48 pm EST
Depending on how you are setting up the dataset will determine how you can setup the schema file. Please note that either way you will need to use the SchemaBuilder to do so. One option would be to manually configure the schema. We do have one sample, the “In-Memory Dataset” sample under the “Relational Data” group in the Windows Sample Browser, which demonstrates manually configuring a schema with the SchemaBuilder and setting a view in the pivot view control through code. As well, you could generate the schema automatically by using the AutoGenerate method of the SchemaBuilder. Please note that the AutoGenerate method returns an instance of a SchemaBuilder containing the automatically generated schema. When doing this, you may need to go through and edit the schema slightly (i.e. reorganizing fields in dimensions, setting up hierarchies, etc.). If you are extracting the data in the dataset from a database, you can automatically generate the schema by passing the name, a connection object that connects to the database, and the SQL statement (used for the dataset) to the AutoGenerate method. Another way you could automatically generate the schema is by passing in a name for the schema, and a generic dictionary with the TKey as String and the TValue as System.Type. The dictionary should contain the field names as the keys and the fields’ data type as the values. You can find more information on generic dictionaries here.
Once the schema is setup in the SchemaBuilder, you can save the schema to a file using the SaveSchema method of the SchemaBuilder instance. Please note that it is not currently possible to open a schema file in the SchemaBuilder or as a new Schema, and that schema files are typically used to create a connection to a relational database (i.e. PivotView1.DataProvider.Connect(DataProviderType.Relational, ”SchemaFile.Schema”)). I have entered a Case #33640 to allow for a schema file to be opened to allow editing and use in unbound mode. I have also included your email address with this Case so that when this is addressed you will be notified.