Angular Localization No setLocalizationFile function

Stimulsoft Reports.JS discussion
690486439
Posts: 15
Joined: Fri Mar 22, 2019 9:19 am

Angular Localization No setLocalizationFile function

Post by 690486439 »

above method has run time error Stimulsoft.Base.Localization.StiLocalization.setLocalization‌​File is not a function

Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile("Localizations/es.xml");
Lech Kulikowski
Posts: 6247
Joined: Tue Mar 20, 2018 5:34 am

Re: Angular Localization No setLocalizationFile function

Post by Lech Kulikowski »

Hello,

Please check the last release build. If the issue still present, please send us a sample project which reproduces the issue for analysis.

Thank you.
690486439
Posts: 15
Joined: Fri Mar 22, 2019 9:19 am

Re: Angular Localization No setLocalizationFile function

Post by 690486439 »

thank very much!!!
I have a need now.
repory initial load mssql , Execute the set sql query And bind the filed model ,
Already set WebServer.url . I don't quite understand how to create connection load data when initializing.
Lech Kulikowski
Posts: 6247
Joined: Tue Mar 20, 2018 5:34 am

Re: Angular Localization No setLocalizationFile function

Post by Lech Kulikowski »

Hello,

Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?

Also, please check the following article:
https://www.stimulsoft.com/en/documenta ... _bases.htm

Thank you.
690486439
Posts: 15
Joined: Fri Mar 22, 2019 9:19 am

Re: Angular Localization No setLocalizationFile function

Post by 690486439 »

hello,
set StiOptions.WebServer.url ="http://localhost/Stimulsoft/Command"
I think Single database set Web Server Url
1: MSSQL01 WebServer.url ="http://localhost/Stimulsoft/Command"?Id=1
2: MSSQL02= WebServer.url ="http://localhost/Stimulsoft/Command"?Id=2
3: MSSQL03= WebServer.url ="http://localhost/Stimulsoft/Command"?Id=3
Can it be achieved?
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Angular Localization No setLocalizationFile function

Post by HighAley »

Hello.

You should specify a path to one of our data adapters as it is described in our documentation.
You don't need to do anything else.
Our data adapter will do all other stuff.

Thank you.
690486439
Posts: 15
Joined: Fri Mar 22, 2019 9:19 am

Re: Angular Localization No setLocalizationFile function

Post by 690486439 »

e.trim is not a function

TypeError: e.trim is not a function at Function.String.isNullOrWhiteSpace (http://localhost:4200/scripts.js:35100:94446) at Function.t.isEmptyKey (http://localhost:4200/scripts.js:35102:84294) at Function.t.getOrGeneratedKey (http://localhost:4200/scripts.js:35102:84640) at s.A.getKey (http://localhost:4200/scripts.js:35110:66476) at Function.t.getOrGeneratedKey2 (http://localhost:4200/scripts.js:35102:76147) at Function.t.getCacheKey (http://localhost:4200/scripts.js:35103:104097) at t.existsInCache (http://localhost:4200/scripts.js:35103:103927) at Array.n.all (http://localhost:4200/scripts.js:35098:5168) at Function.t.fetchAsync (http://localhost:4200/scripts.js:35103:102302) at Function.t.analyseAsync (http://localhost:4200/scripts.js:35103:22210)
690486439
Posts: 15
Joined: Fri Mar 22, 2019 9:19 am

Re: Angular Localization No setLocalizationFile function

Post by 690486439 »

微信图片_20190410163236.png
微信图片_20190410163236.png (37.83 KiB) Viewed 3269 times
690486439
Posts: 15
Joined: Fri Mar 22, 2019 9:19 am

Re: Angular Localization No setLocalizationFile function

Post by 690486439 »

this.designer.report.dictionary.databases.add(new Stimulsoft.Report.Dictionary.StiSqlDatabase("tmp", "tmp", database["connection"]));
database["items"].forEach((databaseList, idx) => {
if (!databaseList["result"]["success"])
return;
var name = databaseList["name"];
var nameValues: Array<NameValueDto> = JSON.parse(databaseList["nameValues"]);
var ds = new Stimulsoft.Report.Dictionary.StiSqlSource("tmp", name, name, databaseList["sql"], true, true, 30, databaseList["sqlId"]);
databaseList["result"]["columns"].forEach(function (column) {
if (nameValue) {
var nameValue = nameValues.filter(x => x.value == column);
if (nameValue.length > 0)
ds.columns.add(new Stimulsoft.Report.Dictionary.StiDataColumn(column, column, nameValue[0]["name"]));
else
ds.columns.add(new Stimulsoft.Report.Dictionary.StiDataColumn(column, column, column));
} else {
ds.columns.add(new Stimulsoft.Report.Dictionary.StiDataColumn(column, column, column));
}
});
var dataSources = this.designer.report.dictionary.dataSources;
dataSources.items.forEach((item) => {
if (item.key == databaseList["sqlId"]) {
this.designer.report.dictionary.dataSources.items.remove(item);
}
});
this.designer.report.dictionary.dataSources.add(ds);
Lech Kulikowski
Posts: 6247
Joined: Tue Mar 20, 2018 5:34 am

Re: Angular Localization No setLocalizationFile function

Post by Lech Kulikowski »

Hello,

Please send us a sample project which reproduces the issue for analysis.

Thank you.
Post Reply