Hello,
I am using PivotCube with a dynamically created Dataset. All Fields are added as Dimension, any numeric format also added as measure.
As not all Measures are helpfull a Masteruser creates a default map with useless measures deleted and calculated measures added.
This Map is saved to Stream by using
map.SaveToStream(Blobstream,false);// without Dimensions
(Blobstream beeing a TMemoryStream)
Normal users load this default map automatically.
This does always work as long as the Datasetdefinition is unchanged.
If Definition of the Dataset is changed (eg. adding a colum) the map can still be loaded (as desired).
If Definition of the Dataset is rebuilt (eg. transered from a different Database) , even if the Columnames are equal, they might be in totally different positions, the Map cannot be loaded again although all columns are still available.
The Message would be : The loaded map is not compatible with currently loaded cube! Dimensions are mismatch.
Do I need to save the Cube into a Memorystream too? Would that help?
that would be something like
cube.SaveToStream(TStreamAdapter.create(Blobstream)); ??
The reloading by
Blobstream.Seek(0, 0);
cube.LoadFromStream(TStreamAdapter.Create(Blobstream));
does not work. Error Message 'Could not read from Stream'.
Anybody any suggestions?
Thanks in advance
Paul