SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 32448: Custom repository can return an exception when attempting to open a stored processes in the SAS Add-in for Microsoft Office

DetailsHotfixAboutRate It

A custom repository can return an exception when attempting to open a stored process in the SAS® Add-in for Microsoft Office. This will most likely happen if your custom repository contains a folder name identical to a folder name in the Foundation repository. When you have this situation and attempt to open a stored process through SAS→Reports, you will receive the following error:

Unexpected exception occured in SAS® Add-in for Microsoft Office.  Please report this error to your site administrator.

System.ArgumentException: Item has already been added. Key in dictionary: 'SAS Folders\BIP Tree'  Key being added: 'SAS Folders\BIP Tree'
   at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
   at System.Collections.Hashtable.Add(Object key, Object value)
   at SAS.EG.SDS.Metadata.BIPTree.PopulateTreeLevel(ArrayList objects, String parentPath)
   at SAS.EG.SDS.Metadata.BIPTree.PopulateTreeLevel(ArrayList objects, String parentPath)
   at SAS.EG.SDS.Metadata.BIPTree.Populate()
   at SAS.EG.SDS.Metadata.BIPTree..ctor(OMSRepository iRep)
   at SAS.EG.SDS.Metadata.OMSRepository.GetObjects(Type type, Type parentType, String parm)
   at SAS.EG.SDS.Metadata.MetadataManager.GetObjects(Type type, Type parentType, String parentName)
   at SAS.EG.SDS.Model.Broker.PopulateFromMetadata(Collection collection)
   at SAS.EG.SDS.Model.Broker.PopulateCollection(Collection collection)
   at SAS.EG.SDS.Model.Collection.DoPopulate()
   at SAS.EG.SDS.Model.Collection..ctor(String name, Type itemType, Object itemData, Base parent, eNodeType nodeType, Boolean fCaseInsensitive, Boolean fDefer)
   at SAS.EG.SDS.Model.OMFolder.get_Folders()
   at SAS.OfficeAddin.ManageFavoritesForm.PopulateRepositoryTreeView()
   at SAS.OfficeAddin.ManageFavoritesForm.InitializeTreeView(RegistryKey settingsKey)
   at SAS.OfficeAddin.ManageFavoritesForm..ctor(IOfficeAddin addin, ContentMode mode)
   at SAS.OfficeAddin.OfficeAddinBase.ManageFavoritesDialog(ContentMode mode)
   at SAS.OfficeAddin.UIManager.ButtonClickHandler(CommandBarButton sender, Boolean& bHandled)

To circumvent this problem, rename the duplicate folder name to a new name. When you do this, the SAS® Add-in will open the reports without errors.

A fix is available that will prevent this exception. This fix does not allow the use of duplicate folder names. If you wish to use a stored process in a duplicate folder, you will still need to rename the folder. To apply the fix and avoid the exception, click the Hot Fix tab in this note.

Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemSAS Add-in for Microsoft OfficeMicrosoft® Windows® for x642.14.29.2 TS2M0
Microsoft Windows 95/982.1
Microsoft Windows 2000 Advanced Server2.1
Microsoft Windows 2000 Datacenter Server2.1
Microsoft Windows 2000 Server2.1
Microsoft Windows 2000 Professional2.1
Microsoft Windows NT Workstation2.1
Microsoft Windows Server 2003 Datacenter Edition2.14.29.2 TS2M0
Microsoft Windows Server 2003 Enterprise Edition2.14.29.2 TS2M0
Microsoft Windows Server 2003 Standard Edition2.14.29.2 TS2M0
Microsoft Windows XP Professional2.14.29.2 TS2M0
Windows Millennium Edition (Me)2.1
Windows Vista2.14.29.2 TS2M0
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.