Code: Select all
$scope.init = function () {
StiOptions.WebServer.url = GenericReportService.connectionLocal;
var options = new $window.Stimulsoft.Designer.StiDesignerOptions();
options.appearance.fullScreenMode = false;
var designer = new $window.Stimulsoft.Designer.StiDesigner(options, 'StiDesigner', false);
var report = new $window.Stimulsoft.Report.StiReport();
console.log(Stimulsoft);
if ($scope.entity.id) {
report.load($scope.entity.jsonReport);
} else {
report.dictionary.databases.clear();
var connStr = "url = jdbc:postgresql://%address/%db?currentSchema=%schema; user = %user; password = %pass;";
report.dictionary.databases.clear();
report.dictionary.databases.add(new Stimulsoft.Report.Dictionary.StiPostgreSQLDatabase("PostgreSQL", "PostgreSQL", connStr));
report.dictionary.synchronize();
}
designer.report = report;
designer.renderHtml('designer');
designer.onSaveReport = function (event) {
var jsonStr = event.report.saveToJsonString();
$scope.entity.name = event.fileName;
$scope.entity.jsonReport = jsonStr;
saveReportType($scope.entity);
};
};
I select to use my connection that I created
When I try to create a new query using that connection I've got the following error.
Code: Select all
Uncaught TypeError: Cannot read property 'typeConnection' of undefined
at stimulsoft.designer.js?v=10:00:22:14
at StiJsDesigner.ExecuteScript (stimulsoft.designer.js?v=10:00:22:15)
at StiJsDesigner.InitializeEditDataSourceForm (stimulsoft.designer.js?v=10:00:22:15)
at HTMLDivElement.t.action (stimulsoft.designer.js?v=10:00:22:14)
at HTMLDivElement.a.onclick (stimulsoft.designer.js?v=10:00:22:11)
What I have to do?
thanks