');
frameDocument.close();
divElement = frameDocument.getElementById("report_div");
divElement.style.padding = this.padding.join(" ");
var frameWindow = this.getContentWindow(this.contentFrame);
frameWindow.xr_NavigateUrl = function(url, target) {
window.xr_NavigateUrl(url, target);
}
frameWindow.DXReportViewerWindow = window;
}
return divElement;
},
getContentFrameElement: function() {
if(!_aspxIsExists(this.contentFrame))
this.createContent();
return this.contentFrame;
},
createContent: function() {
this.container = this.getElement("Div");
this.contentFrame = document.createElement("iframe");
this.contentFrame.id = this.getElementName("ContentFrame");
this.contentFrame.name = this.contentFrame.id;
this.contentFrame.frameBorder = 0;
if(__aspxIE)
this.contentFrame.allowTransparency = true;
this.container.appendChild(this.contentFrame);
if(!this.autosize) {
this.contentFrame.style.width = this.container.style.width;
this.contentFrame.style.height = this.container.style.height;
}
},
GetMainElement: function() {
return this.getContentElementDiv();
},
getOuterContentElement: function() {
if(!this.useIFrame)
return this.getContentElementDiv();
return this.getContentFrameElement();
},
getContentElement: function() {
if(!this.useIFrame)
return this.getContentElementDiv();
return this.getContentElementIFrame();
},
getContentDocument: function(frameElement) {
return frameElement.contentDocument || frameElement.contentWindow.document;
},
getContentWindow: function(frameElement) {
return frameElement.contentWindow;
},
getElement: function(elementNameSuffix) {
return _aspxGetElementById(this.getElementName(elementNameSuffix));
},
getElementName: function(elementNameSuffix) {
return this.name + "_" + elementNameSuffix;
},
setViewSize: function(w, h) {
var el = this.getContentElement();
if(el == null) return;
var width, height;
if(arguments.length == 0) {
var children = el.childNodes;
var width = 0, height = 0;
for(var i = 0; i < children.length; i++) {
if(children[i].tagName != "DIV" && children[i].tagName != "TABLE") continue;
width = Math.max(children[i].clientWidth, width);
height += children[i].clientHeight;
}
} else {
width = w; height = h;
}
el.style.width = _aspxGetValueWithPxUnitEx(width);
el.style.height = _aspxGetValueWithPxUnitEx(height);
if(!this.useIFrame) return;
var fel = this.getContentFrameElement();
if(fel == null) return;
if(this.autosize) {
fel.style.width = fel.parentNode.style.width = _aspxGetValueWithPxUnitEx(this.getFrameSize(el.clientWidth, width, this.padding[1], this.padding[3]));
fel.style.height = fel.parentNode.style.height = _aspxGetValueWithPxUnitEx(this.getFrameSize(el.clientHeight, height, this.padding[0], this.padding[2]));
}
},
getFrameSize: function(clientSize, size, nearPadding, farPadding) {
return clientSize > 0 ? clientSize :
_aspxGetValueWithoutPxUnit(size) + _aspxGetValueWithoutPxUnit(nearPadding) + _aspxGetValueWithoutPxUnit(farPadding);
},
onPageLoad: function(pageCount) {
this.textRange = null;
if(_aspxIsExists(this.bookmarkHighlighter))
this.bookmarkHighlighter.Reset();
this.pageCount = pageCount;
this.assignPageBackColor();
if(this.isInitialized)
this.RaisePageLoadEvent();
},
assignPageBackColor: function() {
var contentElement = this.getContentElement();
for(var child in contentElement.childNodes)
if(contentElement.childNodes[child].tagName == 'TABLE') {
contentElement.style.backgroundColor = contentElement.childNodes[child].style.backgroundColor;
break;
}
},
getKeyHiddenField: function() {
return _aspxGetElementById(this.name + "DXCacheKey");
},
getCurrentPageIndexHiddenField: function() {
return _aspxGetElementById(this.name + "DXCurrentPageIndex");
},
getParametersHiddenField: function() {
return _aspxGetElementById(this.name + "DXParameters");
},
getCurrentPageIndex: function() {
return parseInt(this.getCurrentPageIndexHiddenField().value);
},
setCurrentPageIndex: function(pageIndex) {
return this.getCurrentPageIndexHiddenField().value = pageIndex;
},
setHiddenFieldValue: function(fieldName, value) {
var hiddenField = _aspxGetElementById(this.name + fieldName);
hiddenField.value = value;
},
RaisePageLoadEvent: function() {
var args = new ASPxClientReportViewerPageLoadEventArgs(this.getCurrentPageIndex(), this.pageCount);
this.PageLoad.FireEvent(this, args);
},
GotoBookmark: function(pageIndex, bookmarkPath) {
if(!this.pageByPage) return;
if(this.InCallback())
this.pendingBookmark = { pageIndex: pageIndex, bookmarkPath: bookmarkPath };
else
this.GotoBookmarkCore(pageIndex, bookmarkPath);
},
GotoBookmarkCore: function(pageIndex, bookmarkPath) {
if(pageIndex != this.getCurrentPageIndex()) {
this.execContentChangingCallback(pageIndex, "bookmark", { path: bookmarkPath });
} else {
this.HighlightBookmark(bookmarkPath);
}
},
HighlightBookmark: function(bookmarkPath) {
if(!_aspxIsExists(this.bookmarkHighlighter))
this.bookmarkHighlighter = new dx_BookmarkHighlighter(this.getContentElement(), this.name);
this.bookmarkHighlighter.Highlight(this.getCurrentPageIndex(), bookmarkPath);
},
setWindowLocation: function(win, loc) {
if(__aspxIE && __aspxBrowserVersion >= 7) {
win.document.open("text/html", "replace");
win.document.write("
");
win.document.close();
} else
win.location = loc;
},
getFrameForExport: function() {
return (__aspxIE || __aspxChrome || __aspxSafari) ? this.printHelper.getFrameRecreated() : this.printHelper.getFrame();
},
SubmitParameters: function(parameters) {
parameters[this.ChangedParameterKeyName] = true;
this.getParametersHiddenField().value = _aspxToJson(parameters);
this.execContentChangingCallback(0, "submitParameters");
}
});
_aspxGetValueWithPxUnit = function(value) { return value.toString() + 'px' };
_aspxGetValueWithPxUnitEx = function(value) {
var str = value.toString();
return (str.length < 3 || str.substr(str.length - 2) != 'px') ? _aspxGetValueWithPxUnit(value) : str;
};
_aspxGetValueWithoutPxUnit = function(value) {
var str = value.toString();
return parseInt((str.length >= 3 && str.substr(str.length - 2) == 'px') ? str.substr(0, str.length - 2) : str);
};
function aspxRVSDLoaded(reportViewerID, popupControlID, textEditID, buttonFindID, checkWordID, checkCaseID, radioUpID, radioDownID) {
var popupControl = aspxGetControlCollection().Get(popupControlID);
popupControl.reportViewer = aspxGetControlCollection().Get(reportViewerID);
popupControl.buttonFind = aspxGetControlCollection().Get(buttonFindID);
popupControl.textEdit = aspxGetControlCollection().Get(textEditID);
popupControl.checkWord = aspxGetControlCollection().Get(checkWordID);
popupControl.checkCase = aspxGetControlCollection().Get(checkCaseID);
popupControl.radioUp = aspxGetControlCollection().Get(radioUpID);
popupControl.radioDown = aspxGetControlCollection().Get(radioDownID);
var textEdit = popupControl.textEdit;
var inputElement = textEdit.GetInputElement();
inputElement.onpropertychange = function() {
if(popupControl.buttonFind != null)
popupControl.buttonFind.SetEnabled(inputElement.value != "" && __aspxIE);
};
if(popupControl.reportViewer != null)
popupControl.reportViewer.searchPopupControl = popupControl;
popupControl.ShowAndFocus = function() {
this.Show();
this.buttonFind.Focus();
this.textEdit.SelectAll();
};
popupControl.ShowAndFocus();
}
function aspxRVSDFind(popupControlID) {
var popupControl = aspxGetControlCollection().Get(popupControlID);
if(popupControl != null) {
var params = { "txt" : popupControl.textEdit.GetText(),
"case" : popupControl.checkCase.GetChecked(),
"word" : popupControl.checkWord.GetChecked(),
"up" : popupControl.radioUp.GetChecked()};
popupControl.reportViewer.findTextCore(params);
}
}
function aspxRVSDClose(popupControlID) {
var popupControl = aspxGetControlCollection().Get(popupControlID);
if(popupControl != null)
popupControl.Hide();
}
function dx_ParamFormatter() {
this.params = [];
this.addParam = function(name, val) {
this.params[name] = val;
}
this.getValue = function() {
var val = "";
for(var i in this.params)
val += this.format(i, this.params[i]);
return val;
}
this.format = function(name, val) {
var value = val.toString().replace(/&/g, "&a")
.replace(/:/g, "&c")
.replace(/;/g, "&s");
return name + ":" + value + ";";
}
this.parse = function(s) {
var ss = s.split(";");
for(var i = 0; i < ss.length; i++) {
var sss = ss[i].split(":");
if(sss.length == 2) {
var sss1 = sss[1].replace(/&c/g, ":")
.replace(/&s/g, ";")
.replace(/&a/g, "&");
this.addParam(sss[0], sss[1]);
}
}
}
}
function dx_TextRange(element, searchUp) {
this.isTrue = function(val) {
return val == true || val == "true";
}
this.selText = "";
this.element = element;
this.range = element.document.body.createTextRange();
this.range.moveToElementText(element);
this.originalRange = this.range.duplicate();
this.empty = function() {
this.element.document.selection.empty();
}
this.select = function(text) {
this.range.select();
this.selText = text;
}
this.findText = function(text, mword, mcase, up) {
if(text == null || text.length == 0)
return true;
var fl = this.getFlags(mword, mcase);
var val = this.isTrue(up) ? this.findUp(text, fl) :
this.findDown(text, fl);
if(val) this.select(text);
return val;
}
this.getFlags = function(mword, mcase) {
var fl = 0;
if( this.isTrue(mword) ) fl += 2;
if( this.isTrue(mcase) ) fl += 4;
return fl;
}
this.findUp = function(text, fl) {
this.range.moveEnd("character", -this.selText.length);
var val = this.range.findText(text, -1000, fl) && this.originalRange.inRange(this.range);
if(!val) this.range.moveEnd("character", this.selText.length);
return val;
}
this.findDown = function(text, fl) {
this.range.moveStart("character", this.selText.length);
var val = this.range.findText(text, 1000, fl) && this.originalRange.inRange(this.range);
if(!val) this.range.moveStart("character", -this.selText.length);
return val;
}
}
function dx_BookmarkHighlighter(contentElement, ownerName) {
this.contentElement = contentElement;
this.bookmarkElement = null;
this.selectionTemplate = _aspxGetElementById(ownerName + "_Bookmark");
this.Highlight = function(pageIndex, bookmarkPath) {
if(_aspxIsExists(this.bookmarkElement)) {
try {
this.contentElement.removeChild(this.bookmarkElement)
} catch(e) {}
this.bookmarkElement = null;
}
bookmarkPath = pageIndex.toString() + "_" + bookmarkPath;
var bookmarkElements = this.getBookmarkElements(_aspxGetElementsByTagName(this.contentElement, "A"), bookmarkPath);
if(bookmarkElements.length == 0)
return;
var bounds = this.getBookmarkBounds(bookmarkElements);
this.bookmarkElement = this.addBookmarkElement(bounds);
}
this.Reset = function() {
this.bookmarkElement = null;
}
this.getBorderWidth = function() {
return parseInt(this.selectionTemplate.style.borderWidth);
}
this.getBookmarkElements = function(elements, name) {
var bookmarkElements = new Array();
for(var i = 0; i < elements.length; i++) {
if(elements[i].name == name)
bookmarkElements.push(elements[i].parentNode);
}
return bookmarkElements;
}
this.getBookmarkBounds = function(bookmarkElements) {
var x = this.getLeft(bookmarkElements[0]);
var y = this.getTop(bookmarkElements[0]);
var right = this.getRight(bookmarkElements[0]);
var bottom = this.getBottom(bookmarkElements[0]);
for(var i = 1; i < bookmarkElements.length; i++) {
x = Math.min(x, this.getLeft(bookmarkElements[i]));
y = Math.min(y, this.getTop(bookmarkElements[i]));
right = Math.max(right, this.getRight(bookmarkElements[i]));
bottom = Math.max(bottom, this.getBottom(bookmarkElements[i]));
}
var width = right - x - 2 * this.getBorderWidth();
var height = bottom - y - 2 * this.getBorderWidth();
return {'left' : x, 'top' : y, 'width': width, 'height': height };
}
this.getLeft = function(el) { return _aspxGetAbsoluteX(el) - _aspxGetAbsoluteX(this.contentElement); };
this.getTop = function(el) { return _aspxGetAbsoluteY(el) - _aspxGetAbsoluteY(this.contentElement); };
this.getWidth = function(el) { return el.offsetWidth; };
this.getHeight = function(el) { return el.offsetHeight; };
this.getRight = function(el) { return this.getLeft(el) + this.getWidth(el); };
this.getBottom = function(el) { return this.getTop(el) + this.getHeight(el); };
this.addBookmarkElement = function(bounds) {
var newEl = this.cloneElement(this.selectionTemplate, this.contentElement);
newEl.style.display = 'block';
newEl.style.backgroundColor = '';
this.contentElement.appendChild(newEl);
bounds.left -= this.getLeft(newEl);
bounds.top -= this.getTop(newEl);
newEl.style.width = _aspxGetValueWithPxUnit(bounds.width);
newEl.style.height = _aspxGetValueWithPxUnit(bounds.height);
newEl.style.position = 'relative';
newEl.style.left = _aspxGetValueWithPxUnit(bounds.left);
newEl.style.top = _aspxGetValueWithPxUnit(bounds.top);
if(__aspxOpera) this.contentElement.appendChild(newEl);
return newEl;
}
this.cloneElement = function(element, elementFromTargetDocument) {
if(!__aspxIE || __aspxBrowserMajorVersion > 7)
return element.cloneNode(false);
var clone = elementFromTargetDocument.document.createElement(element.tagName);
clone.innerHTML = element.innerHTML;
for(var i = 0; i < element.attributes.length; i++) {
var a = element.attributes[i];
if(!a.specified) continue;
if(a.name.toLowerCase() == "style")
clone.style.cssText = element.style.cssText;
else
clone.setAttribute(a.name, a.value);
}
return clone;
}
}
function aspxRVGotoBM(name, pageIndex, bookmarkIndices){
var reportViewer = aspxGetControlCollection().Get(name);
if(reportViewer != null) reportViewer.GotoBookmark(pageIndex, bookmarkIndices);
}
function dx_FormHelper() {
this.targetFieldName = '__EVENTTARGET';
this.argumentFieldName = '__EVENTARGUMENT';
this.sendPostbackInWindow = function(win, eventTarget, eventArgument) {
this.eventTarget = eventTarget;
this.eventArgument = eventArgument;
var theForm = this.getTheForm();
var formAttributes = { name : theForm.name, method : theForm.method, action : this.getCorectedAction(theForm.action), id : theForm.id };
var content = "
" +
this.buildTag("form", formAttributes, this.getInputs() + "") +
'
';
this.submitForm(win, content);
}
this.submitForm = function(win, content) {
var me = this;
var submitFormCore = function() {
me.writeContent(win, content);
var theForm = me.getTheForm();
var form = win.document.getElementById(theForm.id);
if(__aspxChrome && form.submit == undefined) {
var fakeInput = win.document.createElement("input");
fakeInput.setAttribute("type", "submit");
win.document.forms[0].appendChild(fakeInput);
fakeInput.click();
} else
form.submit();
};
if(typeof(win.document) == 'object') {
submitFormCore();
return;
}
if(win.frameElement) {
win.frameElement.onreadystatechange = function() {
if(win.frameElement.readyState == "complete") {
win.frameElement.onreadystatechange = null;
submitFormCore();
}
}
win.location = "about:blank";
}
}
this.getCorectedAction = function(action) {
var formAction = action;
if(__aspxChrome || __aspxSafari) {
if(formAction.indexOf('?') < 0)
formAction = formAction + "?dxrep_fake=";
else
formAction = formAction.replace('?', "?dxrep_fake=&");
}
return formAction;
}
this.writeContent = function(win, content) {
var doc = win.document;
doc.open("text/html", "replace");
doc.write(content);
doc.close();
}
this.getInputs = function() {
var theForm = this.getTheForm();
var count = theForm.elements.length;
var element;
var result = "";
for (var i = 0; i < count; i++) {
element = theForm.elements[i];
var tagName = element.tagName.toLowerCase();
if (tagName == "input") {
var type = element.type;
if ((type == "checkbox" || type == "radio") && element.checked)
result += this.buildInput(element.type, this.getElementName(element.name), this.getElementName(element.id), this.getElementValue(element), element.checked);
else if(type == "text" || type == "hidden" || type == "password")
result += this.buildInput(element.type, this.getElementName(element.name), this.getElementName(element.id), this.getElementValue(element));
}
else if (tagName == "select") {
var selectCount = element.options.length;
for (var j = 0; j < selectCount; j++) {
var selectChild = element.options[j];
if (selectChild.selected == true) {
result += this.buildInput("hidden", this.getElementName(element.name), this.getElementName(element.id), selectChild.value);
}
}
}
else if (tagName == "textarea") {
result += this.buildTextArea(this.getElementName(element.name), this.getElementName(element.id), element.value);
}
}
return result;
}
this.getTheForm = function() {
return theForm;
}
this.getElementName = function(name) {
return name;
}
this.getElementValue = function(element) {
if(element.id == this.targetFieldName)
return this.eventTarget;
if(element.id == this.argumentFieldName)
return this.eventArgument;
return element.value;
}
this.buildFakeInput = function(name, value) {
return this.buildInput('hidden', name, name, value);
}
this.buildInput = function(type, name, id, value, checked) {
value = _aspxEncodeHtml(value);
var params = {type : type, name : name, id : id, value : value};
if(checked)
params.checked = checked;
return this.buildTag("input", params);
}
this.buildTextArea = function(name, id, value) {
value = _aspxEncodeHtml(value);
return this.buildTag("textarea", {name : name, id : id}, value);
}
this.buildTag = function(tag, attributes, content) {
var result = '<' + tag + ' ';
for(var attrName in attributes)
result += attrName + '="' + attributes[attrName].toString().replace(/"/g,'"') + '" ';
result += content != null
? '>' + content + '' + tag + '>\n'
: '/>\n';
return result;
}
}
xr_NavigateUrl = function(url, target) {
if(__aspxIE)
xr_NavigateUrlForIE(url, target);
else
_aspxNavigateUrl(url, target);
}
function xr_NavigateUrlForIE(url, target) {
if(url == null)
return;
var a = document.createElement("a");
a.setAttribute('href', url);
if(target != null)
a.setAttribute('target', target);
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
}
ASPxClientReportViewer.Cast = ASPxClientControl.Cast;
ASPxClientReportViewer.prototype.Print = function(pageIndex) {
if(pageIndex == null)
pageIndex = "";
if(this.printUsingAdobePlugIn)
this.execPrintPdf(pageIndex);
else
this.execCallbackPrint(pageIndex);
};
ASPxClientReportViewer.prototype.GotoPage = function(pageIndex) {
pageIndex = Math.max(0, Math.min(pageIndex, this.pageCount - 1));
if(pageIndex != this.getCurrentPageIndex())
this.gotoPageInternal(pageIndex);
};
ASPxClientReportViewer.prototype.Refresh = function() {
this.gotoPageInternal(0);
this.refreshRising.FireEvent(this);
};
ASPxClientReportViewer.prototype.Search = function() {
if(this.IsSearchAllowed())
this.showSearchWindow();
};
ASPxClientReportViewer.prototype.SaveToWindow = function(format) {
this.exportWindow = window.open('', '_blank', 'toolbars=no, resizable=yes, scrollbars=yes');
this.execExport("saveToWindow", {format: format}, this.exportWindow);
};
ASPxClientReportViewer.prototype.SaveToDisk = function(format) {
this.execExport("saveToDisk", {format: format});
};
ASPxClientReportViewer.prototype.IsSearchAllowed = function() {
try {
if(document.body.createTextRange() != null)
return true;
} catch(e) {}
return false;
};
ASPxClientReportViewerPageLoadEventArgs = _aspxCreateClass(ASPxClientEventArgs, {
constructor: function(pageIndex, pageCount){
this.constructor.prototype.constructor.call(this);
this.PageIndex = pageIndex;
this.PageCount = pageCount;
},
IsFirstPage: function() { return this.PageIndex == 0; },
IsLastPage: function() { return this.PageIndex == this.PageCount - 1; }
});
}
/*
playback timings (ms):
captures_list: 93.119
LoadShardBlock: 64.339 (3)
RedisCDXSource: 0.71
load_resource: 86.124
exclusion.robots.policy: 0.19
PetaboxLoader3.resolve: 54.832
CDXLines.iter: 23.62 (3)
esindex: 0.013
exclusion.robots: 0.205
PetaboxLoader3.datanode: 76.008 (4)
*/