By using this site you agree to the use of cookies for analytics and personalized content.
I agree Learn More
Stimulsoft Reports.Flex FAQ
 
1. Which Flash Builder is necessary to work with Stimulsoft Reports.Flex?
2. Do you plan to support of Flex Builder 3.x?
3. How to add the Stimulsoft Reports.Flex components to the Flash Builder projects?
4. What is the difference between Stimulsoft_ViewerFx.swc, Stimulsoft_ViewerFx_Debug.swc libraries?
5. How to create a new report from code?
6. How to load a report?
7. How to save a report?
8. How to show a report in viewer?
9. How to call the report designer?
10. How to print a report?
11. How to export a report?
12. How to change the data connection in the loaded report without help of the designer?
13. How to connect my data to a report?
14. How to change state of some controls in viewer?
15. How to change state of some controls in designer?
16. How to change the viewer theme?
17. How to change the interface language of viewer or designer?
18. How to add the Select Language menu to designer?
1. Which Flash Builder is necessary to work with Stimulsoft Reports.Flex?

Flash Builder 4.5 or higher with Flex SDK version 4.5 or higher.
2. Do you plan to support of Flex Builder 3.x?

No, we do not.
3. How to add the Stimulsoft Reports.Flex components to the Flash Builder projects?

You need to place our libraries to the libs folder of the project.
4. What is the difference between Stimulsoft_ViewerFx.swc, Stimulsoft_ViewerFx_Debug.swc libraries?

Debug libraries are compiled using metadata which contain information about classes and methods of the library which helps in developing the application. Therefore, this library has big size.
5. How to create a new report from code?

Please use the following code:

var report: StiReport = new StiReport();
6. How to load a report?

Please use one of the following methods:

For a report (.mrt, .mrz, .mrx formats)

report.loadReportFromXML(xml: XMLNode);
report.loadReportFromString(reportStr: String);
report.loadReportFromByteArray(bytes: ByteArray);
report.loadPackedReportFromString(reportStr: String);
report.loadPackedReportFromByteArray(bytes: ByteArray);
report.loadEncryptedReportFromString(reportStr: String, key: String);
report.loadEncryptedReportFromByteArray(bytes: ByteArray, key: String);

For a document (rendered report, .mdc, .mdz, .mdx formats)

report.loadDocumentFromXML(xml: XMLNode);
report.loadDocumentFromString(reportStr: String);
report.loadDocumentFromByteArray(bytes: ByteArray);
report.loadPackedDocumentFromString(reportStr: String);
report.loadPackedDocumentFromByteArray(bytes: ByteArray);
report.loadEncryptedDocumentFromString(reportStr: String, key: String);
report.loadEncryptedDocumentFromByteArray(bytes: ByteArray, key: String);
7. How to save a report?

Please use one of the following methods:

For a report (.mrt, .mrz, .mrx formats)

report.saveReportToXML():XMLNode;
report.saveReportToString(): String;
report.saveReportToByteArray(): ByteArray;
report.savePackedReportToString(): String;
report.savePackedReportToByteArray(): ByteArray;
report.saveEncryptedReportToString(key: String): String;
report.saveEncryptedReportToByteArray(key: String): ByteArray;

For a document (rendered report, .mdc, .mdz, .mdx formats)

report.saveDocumentToXML(): XMLNode;
report.saveDocumentToString(): String;
report.saveDocumentToByteArray(): ByteArray;
report.savePackedDocumentToString(): String;
report.savePackedDocumentToByteArray(): ByteArray;
report.saveEncryptedDocumentToString(key: String): String;
report.saveEncryptedDocumentToByteArray(key: String): ByteArray;
8. How to show a report in viewer?

Please use the following code:

report.show();

report.showDialog();
9. How to call the report designer?

Please use the following code:

report.design();

report.designDialog();
10. How to print a report?

Please use the following code:

report.print();
11. How to export a report?

Please use the following code:

var service: StiPdfExportService = new StiPdfExportService();
var settings: StiPdfExportSettings = new StiPdfExportSettings();
var buffer: ByteArray = new ByteArray();
service.exportPdf(report, buffer, settings);
12. How to change the data connection in the loaded report without help of the designer?

Please clear the list of existed databases, create your own database and add this to the report:

report.dictionary.databases.clear();

var database: StiXmlDatabase = new StiXmlDatabase("Demo", "reports/data/Demo.xsd", "reports/data/Demo.xml");
report.dictionary.databases.add(database);

var database: StiMySqlDatabase = new StiMySqlDatabase("DemoSql", "DemoSql",
           "server=localhost;port=3306;database=db_name;user=root;password=;", false);
report.dictionary.databases.add(database);
13. How to connect my data to a report?

For connecting data to a report, you must convert data to the XML format or to DataTable and DataSet structures, and then register data in the report:

Example 1:

var xml: XML =
<Demo>
   <Customers>
      <ID>1</ID>
      <CustomerName>John Smith</CustomerName>
   </Customers>
   <Customers>
      <ID>2</ID>
      <CustomerName>Antonio Moreno</CustomerName>
   </Customers>
   <Customers>
      <ID>3</ID>
      <CustomerName>Elizabeth Brown</CustomerName>
   </Customers>
</Demo>;

var report: StiReport = new StiReport();
report.regData("Demo", "Demo", data);
report.dictionary.synchronize();
report.design();

Example 2:

var table: DataTable = new DataTable("Customers");
var column: DataColumn = new DataColumn("CustomerName", StorageType.StringType);
table.columns.add(column);

table.addNewRow().setValue("CustomerName", "John Smith");
table.addNewRow().setValue("CustomerName", "Antonio Moreno");
table.addNewRow().setValue("CustomerName", "Elizabeth Brown");

var dataSet: DataSet = new DataSet("DataSetName");
dataSet.tables.add(table);

var report: StiReport = new StiReport();
report.regDataSet("DataSetName", "DataSetName", dataSet);
report.dictionary.synchronize();
report.design();

Example 3:

var dataSet: DataSet = new DataSet("Demo");
var table: DataTable = new DataTable("Employees");
dataSet.tables.add(table);

var column: DataColumn;
var row: DataRow;

column = new DataColumn("EmployeeID", StorageType.IntType);
table.columns.add(column);
column = new DataColumn("LastName", StorageType.StringType);
table.columns.add(column);
column = new DataColumn("FirstName", StorageType.StringType);
table.columns.add(column);
column = new DataColumn("BirthDate", StorageType.DateTimeType);
table.columns.add(column);
column = new DataColumn("DrivingLicense", StorageType.BooleanType);
table.columns.add(column);

row = table.addNewRow();
row.setValue("EmployeeID", 1);
row.setValue("LastName", "Fuller");
row.setValue("FirstName", "Andrew");
row.setValue("BirthDate", new StiDateTime(1972, 02, 18));
row.setValue("DrivingLicense", true);

row = table.addNewRow();
row.setValue("EmployeeID", 2);
row.setValue("LastName", "Buchanan");
row.setValue("FirstName", "Steven");
row.setValue("BirthDate", new StiDateTime(1965, 03, 03));
row.setValue("DrivingLicense", true);

row = table.addNewRow();
row.setValue("EmployeeID", 3);
row.setValue("LastName", "Peacock");
row.setValue("FirstName", "Margaret");
row.setValue("BirthDate", new StiDateTime(1974, 09, 12));
row.setValue("DrivingLicense", false);

var report: StiReport = new StiReport();
report.regDataSet("Demo", "Demo", dataSet);
report.dictionary.synchronize();
report.design();
14. How to change state of some controls in viewer?

Please use the setting options in the StiOptions.viewer class. For example:

StiOptions.viewer.toolbar.showOpenButton = false;
15. How to change state of some controls in designer?

Please use setting options in the StiOptions.designer class. For example:

StiOptions.designer.mainMenu.newReportEnabled = false;
16. How to change the viewer theme?

4 themes are available for viewer. You may switch one of the themes using the following code samples:

StiThemeManager.theme = StiTheme.blue;
StiThemeManager.theme = StiTheme.silver;
StiThemeManager.theme = StiTheme.black;
StiThemeManager.theme = StiTheme.office2013;
17. How to change the interface language of viewer or designer?

Please use one of the following code samples:

var language: StiLanguage; language = StiLanguage.fromUrl(url: String);
language = StiLanguage.fromByteArray(byteArray: ByteArray);
language = StiLanguage.fromString(string: String);
language = StiLanguage.fromXml(xml: XMLNode);

Then you need to set the current interface language:

StiLocalization.setLanguage(language: StiLanguage);
18. How to add the Select Language menu to designer?

Please load the language files and add them to the list of available languages using the code below:

StiLocalization.addLanguage(language: StiLanguage);
TwitterTwitterFacebookFacebookRSSRSSLinked inLinked inYoutubeYoutubeStimulsoft BlogStimulsoft BlogViberViberWhatsAppWhatsAppSkypeSkypeTelegramTelegram