davechintan1984 Posted September 19, 2016 Share Posted September 19, 2016 Hi,I am new to jaspersoft reports development. I have an issue regarding registering custom query executor factory for jasper report. I have googled regarding regarding registering factory. In some blogs, it is mentioned that, custom factory needs to be registerd in jasper report properties file, but there is no property file in my report folder. There is one option in jasper soft studio. Right click on the report, click on properties tab, Expand jasper reports and click on properties option. There are three options. Use workspace settings or project settings or file settings. I have added my custom factory at all three levels but no luck. Is it possible to specify this option in jrxml file directly like data apapter? Any help would be appreciated.Thanks, Link to comment Share on other sites More sharing options...
clemens_august Posted September 19, 2016 Share Posted September 19, 2016 Hello!Are you developing an Eclipse plugin as an extension to Jaspersoft Studio?In this case – for me it worked to have a file jasperreports_extension.properties on the class path (if you build with Maven, put it into the folder src/main/resources/), which contains:net.sf.jasperreports.extension.registry.factory.queryexecuters.myreporting=<YOUR_CLASS>, where YOUR_CLASS is the fully qualified class name of your implementation of net.sf.jasperreports.extensions.ExtensionsRegistryFactoryThe .myreporting - part seems to be arbitrary, as far as I remember, it could be anything.Best regards, Clemens Link to comment Share on other sites More sharing options...
clemens_august Posted September 19, 2016 Share Posted September 19, 2016 Hello!Are you developing an Eclipse plugin as an extension to Jaspersoft Studio?In this case – for me it worked to have a file jasperreports_extension.properties on the class path (if you build with Maven, put it into the folder src/main/resources/), which contains:net.sf.jasperreports.extension.registry.factory.queryexecuters.myreporting=<YOUR_CLASS>, where YOUR_CLASS is the fully qualified class name of your implementation of net.sf.jasperreports.extensions.ExtensionsRegistryFactoryThe .myreporting - part seems to be arbitrary, as far as I remember, it could be anything.Best regards, Clemens Link to comment Share on other sites More sharing options...
narcism Posted September 19, 2016 Share Posted September 19, 2016 This has been asked before: http://community.jaspersoft.com/questions/999201/how-i-can-associate-query-language-my-executer-jaspersoft-studioYou need to have the jar(s) with your Query Executer and Factory added to your project's Java Build Path: right click on your project(usually named MyReports), select Properties, select Java Build Path, select Libraries tab, then select Add JARs or Add External JARs depending on where you keep the jar(s).Then you need to set this property globally in Jaspersoft Studio's Preferences:net.sf.jasperreports.query.executer.factory.[your_query_language_name]= [the_canonical_name_of_your_query_executer_factory_class]On windows/linux youc can reach the global preferences by selecting the Window menu then Preferences.On mac you select the Jaspersoft Studion menu then Preferences.In the Preferences menu you expand the Jaspersoft Studio dropdown from the left and choose Properties. Here you will see the alredy defined properties for the built-in query executers like this one:Property Name: net.sf.jasperreports.query.executer.factory.CSV, value: net.sf.jasperreports.engine.query.JRCsvQueryExecuterFactoryYou should be able to do the same for your own query executer. Click the Add button and follow from there. If your query language is not picked up right away after you have set it, please consider restarting Studio. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now