Flexmonster Software License Agreement (“Agreement”) has been revised and is effective as of January 8, 2025.
The following modifications were made:
The modified version of Agreement is available here.
Downloading, installing, and/or continuing to use Flexmonster Software after January 8, 2025, constitutes Licensee’s acceptance of the terms and conditions of the modified version of Agreement. If Licensee does not agree to any of these terms and conditions, they must cease using Flexmonster Software and must not download, install, use, access, or continue to access Flexmonster Software. By continuing to use Flexmonster Software or renewing the license or maintenance after the effective date of these modifications to Agreement, Licensee accepts and agrees to be bound by the terms and conditions of the modified Agreement.
Flexmonster Accelerator can be integrated into your website's back end as a separate ASP.NET controller. The main benefits of referencing the Accelerator as a DLL directly from the ASP.NET project are:
Follow the steps below to run a sample application demonstrating how to use Flexmonster Accelerator as a DLL.
Step 1. To get our sample project, download it as ZIP or clone it with the following command:
git clone https://github.com/flexmonster/pivot-accelerator-dll
Step 2. Open the project in Visual Studio using the pivot-accelerator-dll/Flexmonster Accelerator MVC.sln
file.
Step 3. Run the project by selecting the IIS Express button on the toolbar:
To see the result, open http://localhost:55158/
in your browser.
Follow the steps below to integrate Flexmonster Accelerator into an existing ASP.NET project.
Install the Flexmonster.Accelerator package with NuGet – Visual Studio's package manager:
Flexmonster.Accelerator
package and install it:Inside the Controllers/
folder, create an AcceleratorController
class that extends FlexmonsterProxyController
. This class will handle Flexmonster Pivot’s requests to the Accelerator:
using Flexmonster.Accelerator.Models;
public class AcceleratorController :
Flexmonster.Accelerator.Controllers.FlexmonsterProxyController {
public override void OnRequest(BaseArgs args) {
base.OnRequest(args);
}
}
Check out how the AcceleratorController class is implemented in our GitHub sample project.
Specify the connection string to your SSAS cube for the Accelerator. It can be done inside the Application_Start()
method of the Global.asax.cs
file:
protected void Application_Start()
{
// Other configs
Flexmonster.Accelerator.Controllers.FlexmonsterProxyController
.ConnectionString = "Data Source=<your data source>";
}
If you are connecting to Azure Analysis Services, specify the authentication info in addition to the connection string:
protected void Application_Start()
{
// Other configs
Flexmonster.Accelerator.Controllers.FlexmonsterProxyController
.ConnectionString = "Data Source=asazure://aspaas.asazure.windows.net/myserver";
Flexmonster.Accelerator.Controllers.FlexmonsterProxyController
.AuthHelper = new AzureAuthHelper(
// ResourceURL
// Must match the region from the data source specified in the ConnectionString
"https://aspaas.asazure.windows.net",
// AzureAuthority
"https://login.microsoftonline.com/<your_azure_domain>",
// AzureClientId
"00000000-0000-0000-0000-000000000000",
// AzureClientSecret
"XXXXXXXXXXXXX"
);
}
Learn more about the AzureAuthHelper class.
Note To separate the Accelerator’s configurations from other code, you can create a class with a static method where all the configurations will be set. Then, call this method in Application_Start()
. We used this approach in our sample GitHub project. Open FlexmonsterConfig.cs and Global.asax.cs files to see the example.
You can enable caching for the Accelerator and set a cache memory limit. For example:
protected void Application_Start()
{
// Other configs
Flexmonster.Accelerator.Controllers.FlexmonsterProxyController
.ConnectionString = "Data Source=<your data source>";
Flexmonster.Accelerator.Utils.CacheManager.Enabled = true;
Flexmonster.Accelerator.Utils.CacheManager
.MemoryLimit = 10 * 1024 * 1024; // MB to bytes
}
Learn more about the Accelerator’s configurations.
Run your server with the Accelerator from Visual Studio.
If Flexmonster is not yet embedded, set up an empty component in your webpage:
Complete the Integrating Flexmonster guide. Your code should look similar to the following example:
const pivot = new Flexmonster({
container: "pivotContainer",
toolbar: true
});
Complete the Integration with React guide. Your code should look similar to the following example:
<FlexmonsterReact.Pivot toolbar={true} />
Complete the Integration with Angular guide. Your code should look similar to the following example:
<fm-pivot [toolbar]="true"> </fm-pivot>
Complete the Integration with Vue guide. Your code should look similar to the following example:
<Pivot toolbar />
Create a report where the proxyUrl
, catalog
, and cube
parameters are set to your specific values:
const pivot = new Flexmonster({
container: "pivotContainer",
toolbar: true,
report: {
dataSource: {
type: "microsoft analysis services",
// Flag to use the Accelerator instead of XMLA
binary: true,
// URL to Flexmonster Accelerator
proxyUrl: "http://localhost:50005",
// Catalog name
catalog: "Adventure Works DW Standard Edition",
// Cube name
cube: "Adventure Works"
}
}
});
const pivot = new Flexmonster({
container: "pivotContainer",
toolbar: true,
report: {
dataSource: {
type: "microsoft analysis services",
// Flag to use the Accelerator instead of XMLA
binary: true,
// URL to Flexmonster Accelerator
proxyUrl: "http://localhost:50005",
// Database name
catalog: "Adventure Works DW Standard Edition",
// Model name
cube: "Adventure Works"
}
}
});
Now open the webpage in the browser to see the pivot table with your SSAS data.
Property/Type | Description |
---|---|
ConnectionString String | The connection string for Microsoft Analysis Services. Example: Data Source=localhost; .Access this property through the Flexmonster.Accelerator.Controllers.FlexmonsterProxyController object. |
CacheManager.Enabled Boolean | optional Specifies whether caching is enabled. Access this property through the Flexmonster.Accelerator.Utils object.Default value: true (caching is enabled). |
CacheManager.MemoryLimit Integer | optional The maximum memory size available for caching (in bytes). Access this property through the Flexmonster.Accelerator.Utils object.Default value: 0 (unlimited). |
AuthHelper AzureAuthHelper | optional Required when connecting to Azure Analysis Services. Sets authentication parameters for Azure Analysis Services. Access this property through the Flexmonster.Accelerator.Controllers.FlexmonsterProxyController object. |
This class is necessary when connecting to Azure Analysis Services. Its constructor has the following parameters:
Parameter/Type | Description |
---|---|
ResourceURL String | The URL of your Azure Analysis Services instance. Must be specified as https://<domain name> , where <domain name> is the region from the data source specified in the connection string. Example: https://aspaas.asazure.windows.net . |
AzureAuthority String | The Azure authority URL (e.g., https://login.microsoftonline.com/<your_domain> ). Learn more in the Microsoft guide. |
AzureClientId String | The client ID of the service principal registered in Azure Active Directory. |
AzureClientSecret String | The client secret of the service principal registered in Azure Active Directory. |
By default, logging is disabled in the Accelerator as a DLL. To enable logging, you need to implement the Flexmonster.Accelerator.Utils.ILogger
interface:
Step 1. In your project, create a C# class for the logger (e.g., MyLogger.cs
).
Step 2. Open the created file (e.g., MyLogger.cs
) and import Flexmonster.Accelerator.Utils
:
using Flexmonster.Accelerator.Utils;
Step 3. Implement the Flexmonster.Accelerator.Utils.ILogger
interface by implementing the Error
, Info
, Trace
, and Warn
methods. Your code should look similar to the following:
using Flexmonster.Accelerator.Utils;
namespace Project_Namespace
{
public class MyLogger : ILogger
{
public void Error(string message)
{
System.Diagnostics.Debug.WriteLine(message);
}
public void Error(string message, params object[] args)
{
System.Diagnostics.Debug.WriteLine(message);
}
// Info, Trace, and Warn methods can be implemented similarly
}
}
Notice that the Error
method is overloaded, so it is implemented twice. The same applies to Info
, Trace
, and Warn
methods. Overall, you should have eight methods implemented in your class.
Step 4. Go to the file where the Accelerator is configured (e.g., Global.asax.cs
) and add your logger implementation to other Accelerator configs:
protected void Application_Start()
{
// Other configs
Flexmonster.Accelerator.Controllers.FlexmonsterProxyController
.ConnectionString = "Data Source=<your data source>";
Flexmonster.Accelerator.Utils.LoggerLocator.SetLogger(new MyLogger());
}
Logging is now enabled for the Accelerator as a DLL.