This is my solution and now I have no Timeout:
function DrillthroughSet()
{
this.MDX = ""
this.Tuple = null;
this.Recordset = null;
this.GetRecordset = getRecordset;
// this is the code that actually does the calling out to PivotTable
services to get the drillthrough data.
function getRecordset()
{
var sMDX;
var iMax;
var iNumRecords;
var fUsingOverallLimit = true;
var winTemp;
var cmd; //new for
CommandTimeout
if (this.Recordset != null)
return this.Recordset;
cmd = new ActiveXObject("ADODB.Command"); //new for
CommandTimeout
rs = new ActiveXObject("ADODB.Recordset");
cmd.ActiveConnection = element.Connection; //new
for CommandTimeout
cmd.CommandTimeout = 240; //new
for CommandTimeout
sMDX = this.MDX;
// do some limits checking and make sure we set MAXROWS in the
drillthrough call to return only the max number of
// rows.
if (dt.MaxDrillthroughRecords < 1) // if the user has set
maxdrillthorugh to 0, assume they don't want a limit.
iMax = -1;
else
iMax = (dt.MaxDrillthroughRecords - dt.CurrentRowCount);
if (iMax < 0 || (dt.MaxDrillthroughRecordsPerSet >= 0 &&
dt.MaxDrillthroughRecordsPerSet < iMax))
{
iMax = dt.MaxDrillthroughRecordsPerSet;
fUsingOverallLimit = false;
}
if (iMax > 0)
{
sMDX = sMDX.replace("DRILLTHROUGH", "DRILLTHROUGH MAXROWS " +
String(iMax));
}
else if (iMax == 0)
{
this.Recordset = null;
return null;
}
cmd.CommandText = sMDX; //new for
CommandTimeout
rs = cmd.Execute(); //new for
CommandTimeout
try
{
//rs.Open(); //new for CommandTimeout
}
catch (e)
{
// uhoh, something went wrong when talking to PivotTable services. As
the alert says, it might be some sort
// of security error (e.g., by default, only OLAP administrators have
permission to do drillthrough). Or perhaps
// drillthrough is not enabled/setup right in the cube.
// figure out which window to show this alert from.
if (winChild != null && dt.UserInterface.GetViewMode() ==
constants.plDrillthroughViewModeSpawn)
winTemp = winChild
else
winTemp = window;
winTemp.alert(L_Err8_ErrorMessage);
return null;
}
iNumRecords = rs.RecordCount;
dt.CurrentRowCount = dt.CurrentRowCount + iNumRecords;
if (iNumRecords == iMax)
{
// set a flag so that we show a warning later on when we are done
collecting our recordset.
if (fUsingOverallLimit)
dt.ShowTotalMaxWarning = true;
else
dt.ShowIndividualMaxWarning = true;
}
this.Recordset = rs;
return rs;
}
}
"Reinfried" wrote:
Quote:
Is there a solution to set the CommandTimeout higher (e.g. CommandTimeout =
60) in the Drillthrough.htc-File from Microsoft?
So the default CommandTimeout in AnalysisServices = 30 and unfortunately the
timeout option cannot be set using Analysis Manager.
Many Thanks |