13.07.2015 Views

iReport Ultimate Guide - Nimsoft Library

iReport Ultimate Guide - Nimsoft Library

iReport Ultimate Guide - Nimsoft Library

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>iReport</strong> <strong>Ultimate</strong> <strong>Guide</strong>Figure 11-40 The Query Executers tab in the Options dialogA new language can be added by setting the language name and the Factory class that is used to get an instance of the queryexecuter. Optionally, it is possible to provide a FieldsProvider class that help the user use the custom language, design thequery, and map the fields in the report.Be sure that all the classes and JARs required by the query executer are in the classpath. From this point, you will be able touse the new query language in the report, set it, and enter an appropriate query in the Report query dialog box (Figure 11-41).Figure 11-41 The custom language (myLanguage) in the query dialog11.8.1 Creating a Query Executer for a Custom LanguageIn this section, we will see how to write support for a custom query executer (a very simple one), how to use it in <strong>iReport</strong>, andhow to implement a FieldsProvider, which is a tool to simplify the use of the new language. The new language will be210

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!