Stimulsoft  
English Brazil French German Italian Japanese Russian Spanish Swedish Chinese
Home Products Purchase Downloads ContactUs RegisteredUsers
 
 
 

Stimulsoft Reports.Fx for Flex FAQ


1. What Flex SDK is necessary to work with Reports.Fx?
2. How to add the Reports.Fx components to the Flex Builder/Flash Builder projects?
3. What is the difference between Stimulsoft_ViewerFx.swc, Stimulsoft_ViewerFx_Debug.swc libraries?
4. How to create a new report from code?
5. How to load a report?
6. How to save a report?
7. How to show a report in Viewer.Fx?
8. How to call the report designer?
9. How to print a report?
10. How to change state of some controls in Viewer.Fx?
11. How to change state of some controls in Designer.Fx?
12. How to change the Viewer.Fx theme?
13. How to change the interface language of Viewer.Fx or Designer.Fx?
14. How to add the Select Language menu to Designer.Fx?
15. How to change the data source in the loaded report without help of the designer?

1. What Flex SDK is necessary to work with Reports.Fx?
Flex SDK version 4.0.0.4904. You may download it at http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4

Back to top

2. How to add the Reports.Fx components to the Flex Builder/Flash Builder projects?
You need to compile our libraries to the libs folder of the project.

Back to top

3. 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. Therefore, this library has big size.

Back to top

4. How to create a new report from code?
Please use the following code:

var report: StiReport = new StiReport();

Back to top

5. How to load a report?
Please use one of the following methods:

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

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.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);

Back to top

6. How to save a report?
Do it like this:

Please use one of the following methods:

For a report (.mrt, .mrz, .mrx formats)
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.saveDocumentToString(): String;
report.saveDocumentToByteArray(): ByteArray;
report.savePackedDocumentToString(): String;
report.savePackedDocumentToByteArray(): ByteArray;
report.saveEncryptedDocumentToString(key: String): String;
report.saveEncryptedDocumentToByteArray(key: String): ByteArray;


Back to top

7. How to show a report in Viewer.Fx?
Please use the following code:

report.show();
or

report.showDialog();

Back to top

8. How to call the report designer?
Please use the following code:

report.design();
or

report.designDialog();

Back to top


9. How to print a report?
Please use the following code:


Report.print();

Back to top


10. How to change state of some controls in Viewer.Fx?
Please use the setting options in the StiOptions.viewer class.

For example:

StiOptions.viewer.toolbar.showOpenButton = false;

Back to top


11. How to change state of some controls in Designer.Fx?
Please use setting options in the StiOptions.designer class.

For example:

StiOptions.designer.mainMenu.newReportEnabled = false;


Back to top


12. How to change the Viewer.Fx theme?
3 themes are available for Viewer.Fx. You may switch one of the themes using the following code samples:

StiThemeManager.theme = StiTheme.blue;
StiThemeManager.theme = StiTheme.silver;
StiThemeManager.theme = StiTheme.black;

Back to top


13. How to change the interface language of Viewer.Fx or Designer.Fx?
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);

Back to top


14. How to add the Select Language menu to Designer.Fx?
Please load the language files and add them to the list of available languages using the code below:

StiLocalization.addLanguage(language: StiLanguage);

Back to top


15. How to change the data source 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 = newStiXmlDatabase("Demo", "reports/data/Demo.xsd", "reports/data/Demo.xml");
var database: StiMySqlDatabase = newStiMySqlDatabase("Demo", "", "Server=localhost;Port=3306;Database=db_name;Uid=root;Pwd=;", false);
report.dictionary.databases.add(database);


Back to top


 
 
Privacy | Contact | Sitemap
Copyright (C) 2003-2010 Stimulsoft, All rights reserved