Stimulsoft supports many databases out of the box, but you can plug in your own data adapter for a source that is not built in.

Registering the adapter. Add your custom database and adapter service to the global StiOptions.Services collections so the engine and designer recognize the new data source:
StiOptions.Services.Databases.Clear();
StiOptions.Services.Databases.Add(new CustomPostgreSQLDatabase());
StiOptions.Services.DataAdapters.Add(new CustomPostgreSQLAdapterService());

Using the custom database in a report. Create the database with a connection string, add it to the report dictionary, and open the designer:
var database = new CustomPostgreSQLDatabase("CustomData1",
    "Server=127.0.0.1; Port=5432; Database=myDataBase; User Id=myUsername; Password=myPassword;");
report.Dictionary.Databases.Clear();
report.Dictionary.Databases.Add(database);
report.Design();

The custom adapter is made of a few classes (a database, a source, and an adapter service) that describe how to connect and read data, giving you full control over an otherwise unsupported data source.

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.