Get Free Trial

Connecting Flexmonster Pivot to Microsoft SQL Database

PLEASE NOTE: Since we update Flexmonster Pivot with new features biweekly, the information might become outdated. Please check our latest news.

Recently we have received a number of feedback about getting Flexmonster Pivot connected to MSSQL database. Flexmonster Pivot can read from various databases, using CSV format to read data from tables for database reports. Our team has prepared simple C#.NET script and web project, which can be deployed within minutes on your IIS server.

Download the MSSQL 2 CSV script here.

Unpack the contents and copy to a folder that will be published on web. Locate the default.aspx file, which actually renders CSV from table and see the following code:

    protected void Page_Load(object sender, EventArgs e) {
		SqlToCsvConvertor conv = new SqlToCsvConvertor();
        conv.SQLQuery = "select * from YOUR_TABLE";
        conv.DBConnectionString = "server=SERVER;database=DATABASE;user ID=web;password=web";

Just replace SQLQuery with a complete query to your table and DBConnectionString with a connection string to your server and database. Just keep in mind that you can further enhance script with security, pre-filtering of data etc.

That’s it! Now publish default.aspx on web and you are all set. Use New -> CSV (URL) from toolbar to load data and verify Flexmonster Pivot is able to connect to your new data source. See also complete reference manual on defining the data source for your olap report.

Let us know your feedback, share your thoughts on which integrations aspects you’d like to see more in our blog!