PHP MySQL Connection

Stimulsoft Reports.JS discussion
Post Reply
nexar
Posts: 31
Joined: Tue May 02, 2017 5:55 pm

PHP MySQL Connection

Post by nexar »

I've JUST started using the app. I'm trying to very quickly get to a connection stage for my database. Here is my very simple test.html

Code: Select all

<!DOCTYPE html>
<html>
<head>
	<!-- Report Designer Office2013 style -->
	<link href="../Css/stimulsoft.designer.office2013.whiteblue.css" rel="stylesheet">
	<!-- Stimusloft Reports.JS -->
	<script src="../Scripts/stimulsoft.reports.js" type="text/javascript"></script>
	<script src="../Scripts/stimulsoft.viewer.js" type="text/javascript"></script>
	<script src="../Scripts/stimulsoft.designer.js" type="text/javascript"></script>

	<!-- Application scripts -->
	<script>
		function createDesigner() {
			StiOptions.WebServer.url = "gi/JS/DataAdapters/PHP/handler.php";
			//Server=localhost; Database=gi_development; uid=root; password=admin;
			var options = new Stimulsoft.Designer.StiDesignerOptions();
			options.appearance.fullScreenMode = true;
			options.appearance.htmlRenderMode = Stimulsoft.Report.Export.StiHtmlExportMode.Table;
			
			// Create an instance of the designer
			designer = new Stimulsoft.Designer.StiDesigner(options, "StiDesigner", false);
			
			
			designer.renderHtml("designerContent");
		}
		
		//After Body load call createDesigner function
		function onBodyLoad()
		{
			createDesigner();
		
		}
	
	</script>
</head>
<body onload="onBodyLoad();">
<h1>Test Report</h1>

<div id="designerContent"></div>

</body>
</html>
This brings up the designer. I then go to File and create a new blank report. I move to the Dictionary tab and right click on Data Sources and choose New Data Source and then Data from MySQL Connection. That brings up what I've attached here.

I'm not sure what I should be entering in the first 3 fields. Also I'm not sure whether the php script name I've entered in my html is correct.

All advice gratefully received with thanks.
Attachments
Screenshot from 2017-05-02 19-23-53.png
Screenshot from 2017-05-02 19-23-53.png (155.78 KiB) Viewed 1577 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: PHP MySQL Connection

Post by Alex K. »

Hello,

In this case, in first you should add New MySQL Connection and the Data Source.

Thank you.
Post Reply