Saving and Loading Maps

Discussion forum for PivotCube VCL users. Common questions. Bug and problem reports

Moderator: Alex Zencovich

Saving and Loading Maps

Postby gsaunders » Fri May 04, 2007 3:06 pm

Let's say we have pull in a DataSet 1 which includes all data to date.

We setup our defaul dimensions and what not at the component level so when the data loads they get this by default. We are allowing the user the ability to adjust these dimensions and then save the map so they can reload it at a different time. Which in general works, HOWEVER...

Let's say it is a month later and they load the new current DataSet 1 which has a month more worth of data. They then load the map they saved previously. We then start seeing problems. It seems the map stores a lot of data information (things that can be filtered) and it is possible the new DataSet 1 has new data for filtering and because we loaded the map saved from last month it is possible they won't see their data correctly.

What we have had to do is when the user goes to save the map (Assuming they aren't using filters) is we save the map when the dataset is empty so when they load that map on a newer dataset it doesn't confuse things.

Ultimately I guess I would like to know if there is a way around the quirks of saving a map and then using it with a newer dataset and not have data appear to be missing.

An even better example would be one query which is based on Job Number X. The user adjust the dimensions and saves the map. Then they do a query on Job Number Y and then they want that same map to be used so they load the map and you don't see your data properly. It is as if the Map has saved all the field data in the dimensions and prevents them from seeing the data with the new dataset that was based on a differnet Job. This explains why the map size is pretty large when we save it while the user has a large cube. If I use an empty dataset and save the map it is much, much smaller.

Also let's say the user does want to save the filter... Assuming the filter isn't on something that has already by filtered by a query like Job Number then we should be able to save the map and have it ONLY save the items that have been filtered and NOT all of the other possible fields. It would seem to me this would prevent causing problems with the data and then when the user went to adjust the filter you could then load all the current field data to give them the additional data they can filter on.

I don't know if this all makes sense or not. Just wanted to get your feedback and thoughts on this as we really would like one map to be used on many different identical queries that have already been filtered by the query itself before going into the pivotcube (By Job No). You may ask why not pull in all jobs and use the pivotcube to filter things... well not all users have security access to all jobs and the underlying data size gets MASSIVE with all jobs so it isn't feasible doing that.

Thanks for your time and input and I look forward to your response!!!

Greg
gsaunders
Guest
 
Posts: 2
Joined: Fri May 04, 2007 2:39 pm

Postby AlexZencovich » Fri May 04, 2007 3:52 pm

Hello,

1. You may avoid save dimension info to map - set second parameter SaveDimensionInfo = False like

PivotMap1.SaveToStream(Stream,False);


In that case there will no difference on which dataset was used when map loaded.
it also will produce quite small maps and you will not need to keep 'map templates'

2. If you have filters and save them to map (SaveDimensionInfo = True, default value)

Only filtered items will marked as filtered when map loaded. There compared by KeyField value to be sure - is finded item same item as saved.

Of course if keyfields was changed, nobody can knwo which items are same, which are different.

But, there also is different reasons to save all other items, not only filtered

1. Hierarchies. User may add or delete hierarchy groups in dimension so it is needed to save last actual state
2. User (potentially, via developer interface) can change item captions like translate them to another language, add marks or notices. That should be saved too.

Propabably this is possible to create high-sophisticated, intellectual algorithm to save/load dimension items in that case but in common way it seems like useless work.

Most problem is, like you wrote - what we should to do if dimension set changed since last map used (and saved). It may be 2 states

1. new items added to cube, they not existed in map

2. old items removed from cube, they existed in map but no longer existed in cube

3. Mix 1+2 - some new added, some old removed.


By now, all items which could not be found in cube will marked as empty and disabled but loaded. Developer may check them and delete (if required). All new (in cube) items will keep their state and will not touched by map load process.
Best regards,

Alex Zencovich
-------------------------------------------------------------------------------------------------------------------------------------------
www.pivotcube.com - OLAP solution for Delphi, C++ Builder and ActiveX environment
AlexZencovich
Site Admin
 
Posts: 580
Joined: Sun Jun 18, 2006 10:09 am

Postby gsaunders » Fri May 04, 2007 5:52 pm

Thanks... I believe I got all of that.

Primarily the SaveDimensionInfo may do the trick for us. If I understand correctly it will save how they have things laid out... without all the bulk.

To make sure I understand...

If I wanted to save filtered (DimensionInfo) and we run into the situation where there are new items that don't exist in the map will these new items be available for filtering once the map loads? Or will they not be available for filtering because the map was an older one that did not have this data originally?

Thanks again for your help!
gsaunders
Guest
 
Posts: 2
Joined: Fri May 04, 2007 2:39 pm

Postby AlexZencovich » Fri May 04, 2007 6:20 pm

Yes of course. They will available for filtering.
Best regards,

Alex Zencovich
-------------------------------------------------------------------------------------------------------------------------------------------
www.pivotcube.com - OLAP solution for Delphi, C++ Builder and ActiveX environment
AlexZencovich
Site Admin
 
Posts: 580
Joined: Sun Jun 18, 2006 10:09 am


Return to PivotCube VCL

Who is online

Users browsing this forum: No registered users and 0 guests

cron