Connection Problem

Stimulsoft Reports.JS discussion
Post Reply
User avatar
bgelatti
Posts: 5
Joined: Tue May 23, 2017 1:34 pm

Connection Problem

Post by bgelatti »

I'm trying to add a connection to my designer from my JS code so, here is the code.

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);
			};
		};
newdatasource.png
newdatasource.png (29.12 KiB) Viewed 2737 times
So I click on new DataSource
connection.png
connection.png (33.84 KiB) Viewed 2737 times
I select to use my connection that I created
newquery.png
newquery.png (29.7 KiB) Viewed 2737 times
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
Best Regards.
Bruno Gelatti
Lattes - http://lattes.cnpq.br/4081911220610517
LinkedIn - https://br.linkedin.com/in/brunogelatti

(\_/)
(o.o)
(")(")
This is Bunny. Copy Bunny into your signature to help him on his way to world domination!
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Connection Problem

Post by HighAley »

Hello.

Sorry for the delay with answer.
We are working on the solution.

Thank you.

Ticket number: #4380
User avatar
bgelatti
Posts: 5
Joined: Tue May 23, 2017 1:34 pm

Re: Connection Problem

Post by bgelatti »

Hello.


Where I can view the status of that solution?

Thanks
Best Regards.
Bruno Gelatti
Lattes - http://lattes.cnpq.br/4081911220610517
LinkedIn - https://br.linkedin.com/in/brunogelatti

(\_/)
(o.o)
(")(")
This is Bunny. Copy Bunny into your signature to help him on his way to world domination!
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Connection Problem

Post by HighAley »

Hello.

The ticket number is for internal use.
We are still working on your issue.
We will let you know when we get any result.

Thank you.

Ticket number: #4380
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Connection Problem

Post by Alex K. »

Hello,

We couldn't reproduce this bug on last build. Please try to check the last release and let us know about the result.

Thank you.
Post Reply