Ranet OLAP HTML PivotTable Page

StatusIDPriorityType
Closed31777CriticalQuestion
ProfileReply
Micah.ArmantroutClient

Is there a way to view the toolbar on a page ? If not is there a way to auto connect the Pivot Table Control ?

Replies

UserDescriptionPosted On
Vyacheslav SemenkovClient

Hello, Micah.

Can you provide a more detailed description of what you want to do?

Best regards,
Vjacheslav Semenkov

Micah.ArmantroutClient

I would like my users to just load up the webpage and not choose a perspective or connection I just want it to load the data on page load. But I also want them to have access to the toolbar so the can export to excel and view the MDX ect.

Vyacheslav SemenkovClient

You can configure visibility of buttons in toolbar through our api. You can get more information in this article:
https://galaktika-soft.com/ranet-olap/frontend-customization-ranet-html-pivot-table.html
Also, you can call application actions this way.

Best regards,
Vjacheslav Semenkov

Micah.ArmantroutClient

is there a way to add the toolbar with jquery ? I have not been able to figure it out

Vyacheslav SemenkovClient

No. If you want to use jquery plugin instead of our angular application, you'll have to implement toolbar functionality by yourself.

Best regards,
Vjacheslav Semenkov

Micah.ArmantroutClient

Is there a API I can call with the jquery version to attach to a button ? or that needs to be implemented as well ?

Micah.ArmantroutClient

Is there a API I can call with the jquery version to attach to a button ? or that needs to be implemented as well ?

Micah.ArmantroutClient

if there is an API which I can call how do I call it ?

Vyacheslav SemenkovClient

At the moment you can only open the page with the help of API of JQuery plugin.

We highly recomend our users to use angular application and it's API. But if JQuery is the only way for you, we can expand the API on your request so it will meet your requirements.

Micah.ArmantroutClient

no I can use the angular plugin no worries.

I followed creating a page on

https://galaktika-soft.com/blog/frontend-customization-ranet-html-pivot-table.html

see pivot-table-add-page-to-report.png

and I get the following error what am I doing wrong ?

angular.min.js:118 locale: E_MISSING_PARAMETER: Missing required parameter `locale`.
at createError (http://localhost:28447/Assets/vendors/globalize/globalize.js:105:10)
at validate (http://localhost:28447/Assets/vendors/globalize/globalize.js:182:9)
at validateParameterPresence (http://localhost:28447/Assets/vendors/globalize/globalize.js:221:2)
at new Globalize (http://localhost:28447/Assets/vendors/globalize/globalize.js:354:2)
at Globalize (http://localhost:28447/Assets/vendors/globalize/globalize.js:351:10)
at Function.t.localize (http://localhost:28447/Assets/js/ranetControls.min.js:2346:20)
at t.getView (http://localhost:28447/Assets/js/ranetControls.min.js:11916:44)
at t.get [as view] (http://localhost:28447/Assets/js/ranetControls.min.js:11909:76)
at u.C (http://localhost:28447/Assets/js/ranetControls.min.js:14204:92)
at u.N (http://localhost:28447/Assets/js/ranetControls.min.js:14457:174)

Micah.ArmantroutClient

Sometimes I get
angular.min.js:118 TypeError: Cannot read property 'showToolbar' of undefined
at u.le (ranetControls.min.js:15248)
at u.init (ranetControls.min.js:15924)
at o (ranetControls.min.js:16113)
at i.setPage (ranetControls.min.js:16188)
at g (app.min.js:17)
at C (app.min.js:25)
at app.min.js:531
at m.$broadcast (angular.min.js:148)
at Object.n.addNewPage (app.min.js:2422)
at window.onload (Index:101)

Micah.ArmantroutClient

ok I figured out the showToolbar issue. Here is my new index page now I am just having trouble with locale

angular.min.js:118 locale: E_MISSING_PARAMETER: Missing required parameter `locale`.
at createError (http://localhost:28447/Assets/vendors/globalize/globalize.js:105:10)
at validate (http://localhost:28447/Assets/vendors/globalize/globalize.js:182:9)
at validateParameterPresence (http://localhost:28447/Assets/vendors/globalize/globalize.js:221:2)
at new Globalize (http://localhost:28447/Assets/vendors/globalize/globalize.js:354:2)
at Globalize (http://localhost:28447/Assets/vendors/globalize/globalize.js:351:10)
at Function.t.localize (http://localhost:28447/Assets/js/ranetControls.min.js:2346:20)
at t.getView (http://localhost:28447/Assets/js/ranetControls.min.js:11916:44)
at t.get [as view] (http://localhost:28447/Assets/js/ranetControls.min.js:11909:76)
at u.C (http://localhost:28447/Assets/js/ranetControls.min.js:14204:92)
at u.N (http://localhost:28447/Assets/js/ranetControls.min.js:14457:174

Attached files:
Micah.ArmantroutClient

ok I figured out the showToolbar issue. Here is my new index page now I am just having trouble with locale

angular.min.js:118 locale: E_MISSING_PARAMETER: Missing required parameter `locale`.
at createError (http://localhost:28447/Assets/vendors/globalize/globalize.js:105:10)
at validate (http://localhost:28447/Assets/vendors/globalize/globalize.js:182:9)
at validateParameterPresence (http://localhost:28447/Assets/vendors/globalize/globalize.js:221:2)
at new Globalize (http://localhost:28447/Assets/vendors/globalize/globalize.js:354:2)
at Globalize (http://localhost:28447/Assets/vendors/globalize/globalize.js:351:10)
at Function.t.localize (http://localhost:28447/Assets/js/ranetControls.min.js:2346:20)
at t.getView (http://localhost:28447/Assets/js/ranetControls.min.js:11916:44)
at t.get [as view] (http://localhost:28447/Assets/js/ranetControls.min.js:11909:76)
at u.C (http://localhost:28447/Assets/js/ranetControls.min.js:14204:92)
at u.N (http://localhost:28447/Assets/js/ranetControls.min.js:14457:174

Attached files:
Micah.ArmantroutClient

ok I figured out the showToolbar issue. Here is my new index page now I am just having trouble with locale

angular.min.js:118 locale: E_MISSING_PARAMETER: Missing required parameter `locale`.
at createError (http://localhost:28447/Assets/vendors/globalize/globalize.js:105:10)
at validate (http://localhost:28447/Assets/vendors/globalize/globalize.js:182:9)
at validateParameterPresence (http://localhost:28447/Assets/vendors/globalize/globalize.js:221:2)
at new Globalize (http://localhost:28447/Assets/vendors/globalize/globalize.js:354:2)
at Globalize (http://localhost:28447/Assets/vendors/globalize/globalize.js:351:10)
at Function.t.localize (http://localhost:28447/Assets/js/ranetControls.min.js:2346:20)
at t.getView (http://localhost:28447/Assets/js/ranetControls.min.js:11916:44)
at t.get [as view] (http://localhost:28447/Assets/js/ranetControls.min.js:11909:76)
at u.C (http://localhost:28447/Assets/js/ranetControls.min.js:14204:92)
at u.N (http://localhost:28447/Assets/js/ranetControls.min.js:14457:174

Attached files:
Micah.ArmantroutClient

It appears that the error

angular.min.js:118 locale: E_MISSING_PARAMETER: Missing required parameter `locale`.

only appears once in a while I haven't completely figured out what is going on. If I hard code the local varable

Change
line 2346: return Globalize(t._locale).formatMessage(e, i)
to:
return Globalize("en").formatMessage(e, i)

I still get
angular.min.js:118 Error: E_MISSING_CLDR: Missing required CLDR content `supplemental/likelySubtags`.

this looks like it could be something to do with a race condition with the AJAX call below

}), t.init = function(i, n, o, r, a) {
var s = this;
if (void 0 === r && (r = "en"), void 0 === a && (a = !1), t._isInit) throw new Error("InvalidOperationException");
var l = $.Deferred();
return $.when($.ajax({
url: i + "api/localization/getDictionary/" + ("zh" === o ? "zh-CN" : "cs" === o ? "cs-CZ" : o) + "?fallbackLanguage=" + r
}), $.ajax({
url: n + "vendors/cldrData/main/" + o + "/ca-gregorian.json"
}), $.ajax({
url: n + "vendors/cldrData/main/" + o + "/numbers.json"
}), $.ajax({
url: n + "vendors/cldrData/supplemental/likelySubtags.json"
})).done(function(e, i, n, r) {
if (Globalize.load(i[0], r[0], n[0]), "False" === e[2].getResponseHeader("Localization-complete") && (s._complete = !1), ("False" === e[2].getResponseHeader("Localization-exists") || a) && (s._exists = !1), s.availableLocalizations.indexOf(o) >= 0) {
var c = {};
c[o] = e[0], Globalize.loadMessages(c)
}
t._locale = o, t._isInit = !0, l.resolve({
messages: e
})
}).fail(function(t) {
e.LogService.error(t), l.reject(t)
}), l

Vyacheslav SemenkovClient

Can you also attach screenshot of your xhr requests?

Something like in the attachment.

Best regards,
Vjacheslav Semenkov

 

 

Attached files:
Micah.ArmantroutClient

attached is a screenshot and the zip file contains a HAR file that can be loaded into chrome for more infomation

Attached files:
Micah.ArmantroutClient

attached is a screenshot and the zip file contains a HAR file that can be loaded into chrome for more infomation

Attached files:
Vyacheslav SemenkovClient

Ok, seems like I've find what the problem is. You were right about race condition, but it happens in the other place in application.

First, try to load page with enabled chrome throttling (something realy slow), and if the problem will be constant, then my suggestion is right. When you open report on window.onload application shows you "loading" message and tries to localize it, but localization isn't loaded at that moment.

We have already encountered this problem and there is a solution. Anngular application notifies parent window when it's loaded. So, you should subscribe to this event, instead of window.onload.

parent.addEventListener('message', function (event) {
if(event.data === 'Loaded') {
// Do smth
}
});

Best regards,
Vjacheslav Semenkov

Micah.ArmantroutClient

I switched it to slow 3G and it seems it doesn't load any of the custom code I have written and I have to make a new report through the interface.

when I use
parent.addEventListener('message', function (event) {
if(event.data === 'Loaded') {
// Do smth
}
});

with the slow 3g I still get

locale: E_MISSING_PARAMETER: Missing required parameter `locale`.

if I switch it to online I get no information from the cube see none.png

Attached files:
Vyacheslav SemenkovClient

Try the same solution with the latest version of Ranet PivotTable. I'll send you an email with detailed info.

Best regards,
Vjacheslav Semenkov

Micah.ArmantroutClient

I hate to reply and tell you that with upgrading to new version I still experience the same issue. I can reproduce the issue constantly by restarting my webserver and visiting it for the first time 90% of the time it happens then. If you are having trouble reproducing the issue let me know and I can make a test app to send you

Attached files:
Micah.ArmantroutClient

Please see attached zip that contains image of the error and the network tab as well as the HAR file

Micah.ArmantroutClient

Please see attached zip that contains image of the error and the network tab as well as the HAR file

Vyacheslav SemenkovClient

Here is the HAR file, as well as the html page and screenshot of network page. I'm afraid, I can't reproduce the bug in current version.

Attached files:
Micah.ArmantroutClient

ok I will try some other things. I am still trying to have the backend working with ASP.Net as well

Micah.ArmantroutClient

I have added the example

https://galaktika-soft.com/blog/frontend-customization-ranet-html-pivot-table.html

to add a page but the page does not get added. What am I doing wrong ?

Attached files:

× This ticket is closed.

Write US