Hi all.
I have an issue where my dbr's stop working in excel 2003. We are basically using vba to run a series of TI's after taking parameters from the user and also reading and writing back to a series of datapoints in tm1, not more than 100.
Now the Tis continue to run which means the connection is still open but the dbr or dbsw or dbs do not work until I restart Excel and in the meanwhile they come up with either key error or error 2042. I log in as admin so security should not be an issue. Like I said on restart of Excel it works fine.
Any ideas what it could be.
cheers.
dbr or dbs or dbsw stop working
-
- Community Contributor
- Posts: 110
- Joined: Thu Aug 26, 2010 7:41 am
- OLAP Product: TM1, PA
- Version: PAL 2.0.8
- Excel Version: 2016
- Location: North West England
dbr or dbs or dbsw stop working
Always Open to Opportunities
-
- Posts: 19
- Joined: Fri Jan 22, 2010 3:07 pm
- OLAP Product: Cognos TM1
- Version: 9.1 SP4+ 9.4.1 FP3+ 9.5.2 FP1
- Excel Version: 2003 + 2010
Re: dbr or dbs or dbsw stop working
I hope you are calling TM1RECAlC function in vba after the TI execution
-
- Posts: 54
- Joined: Tue Jun 15, 2010 1:43 pm
- OLAP Product: Cognos TM1
- Version: 9.0 - 10.2
- Excel Version: 2010
Re: dbr or dbs or dbsw stop working
I have seen this error and sometimes adding Activeworkbook.calculate after the TM1Recalc has worked
Another solution is to go through each sheet and do the following
Application.run "Tm1recalc1"
Activesheet.calculate
Another solution is to go through each sheet and do the following
Application.run "Tm1recalc1"
Activesheet.calculate
-
- Community Contributor
- Posts: 110
- Joined: Thu Aug 26, 2010 7:41 am
- OLAP Product: TM1, PA
- Version: PAL 2.0.8
- Excel Version: 2016
- Location: North West England
Re: dbr or dbs or dbsw stop working
Usually yes we do call the TM1Recalc or Tm1recalc1 function. BUt the thing is the Dbr I am reffering it is actually within my VBA code and not on the workbook or in a sheet i.e. I am putting in a application.run("DBR", etc etc etc) function and it just does not work. I am still connected to TM1, Ti executes but the DBR just stop working via the application.run routine and the sheet itself. only an excel restart fixes the issue.
Always Open to Opportunities
-
- Community Contributor
- Posts: 110
- Joined: Thu Aug 26, 2010 7:41 am
- OLAP Product: TM1, PA
- Version: PAL 2.0.8
- Excel Version: 2016
- Location: North West England
Re: dbr or dbs or dbsw stop working
Figured this out.
Had to put an:
Application.Run ("M_Clear") before my DBR.
As just prior to this the DImension was changed by another TI so the M_Clear needed to be called to reload and refresh the dimensions in memory. (Possibly??!!!)
Had to put an:
Application.Run ("M_Clear") before my DBR.
As just prior to this the DImension was changed by another TI so the M_Clear needed to be called to reload and refresh the dimensions in memory. (Possibly??!!!)
Always Open to Opportunities
- paulsimon
- MVP
- Posts: 808
- Joined: Sat Sep 03, 2011 11:10 pm
- OLAP Product: TM1
- Version: PA 2.0.5
- Excel Version: 2016
- Contact:
Re: dbr or dbs or dbsw stop working
Yes M_CLEAR seems likely. Excel caches up some of the TM1 data, and using the M_CLEAR macro can be used to force Excel to refresh its local cache of TM1 data. I have also used it in the past to get Dynamic MDX subsets to refresh.
Regards
Paul Simon
Regards
Paul Simon