Jump to content
We've recently updated our Privacy Statement, available here ×

softwareguy

Members
  • Posts

    7
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by softwareguy

  1. I've noticed an increase in compile time as well. (i'm using iReport 4.5.0.)
  2. Related to getting the "Read Fields" functionality working for a custom query executor... and related the suggestion to ensure all parameters have valid default values defined: http://jasperforge.org/plugins/espforum/view.php?group_id=83&forumid=101&topicid=65109 Making sure all parameters have a valid "defaultValueExpression" did correct the "Error:null" Read Fields error for me, however, I'm still having problem with two types of parameters: PROBLEM #1) Any parameters where I use a localized string in the defaultValueExpression, such as: <parameter name="MY_REPORT_NAME" class="java.lang.String" isForPrompting="false"> <defaultValueExpression><![CDATA[$R{NOT_AVAILABLE}]]></defaultValueExpression> </parameter> I seem to get an "Attempt to access property on undefined variable or class name" error/exception as per the full exception below: ------------------ Sourced file: inline evaluation of: ``$R{NOT_AVAILABLE}'' : Attempt to access property on undefined variable or class name : at Line: 1 : in file: inline evaluation of: ``$R{NOT_AVAILABLE}'' : { at bsh.BSHPrimarySuffix.doProperty(Unknown Source) at bsh.BSHPrimarySuffix.doSuffix(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHBinaryExpression.eval(Unknown Source) at bsh.BSHIfStatement.evaluateCondition(Unknown Source) at bsh.BSHTernaryExpression.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at com.jaspersoft.ireport.designer.data.ReportQueryDialog.recursiveInterpreter(ReportQueryDialog.java:2606) at com.jaspersoft.ireport.designer.data.ReportQueryDialog$FieldReader.run(ReportQueryDialog.java:773) ------------------ So I'm guessing I should not be using a localized ($R) string in a parameters defaultValueExpression? PROBLEM #2) Any parameters where I use our custom $P{REPORT_SCRIPTLET} in the defaultValueExpression, such as: <parameter name="ToDate" class="java.lang.String" isForPrompting="false"> <defaultValueExpression><![CDATA[$P{REPORT_SCRIPTLET}.getFormattedDate()]]></defaultValueExpression> </parameter> Seems to result in a null pointer exception. I'm guessing because the ${REPORT_SCRIPTLET} parameter is not initialized for the "Read Fields" functionality? I did find if I try to instantiate by custom Report Scriptlet, such as: <parameter name="ToDate" class="java.lang.String" isForPrompting="false"> <defaultValueExpression><![CDATA[new my.company.reports.MyReportScriptlet().getFormattedDate()]]></defaultValueExpression> </parameter> That seems to work for *most* of my custom scriptlet methods, however, I'm guessing that is not the safest solution because it looks like instantiating my custom report scriptlet myself causes certain other parameters that the report scriptlet methods might depend on (such as REPORT_LOCALE) may not get set propertly. But at least it seems to work for static/independent methods in the report scriptlet that perform simple functions that don't need other parameters or environmental settings. So my questions? QUESTION #1) Any suggestions for allowing $R{} values in defaultValueExpression for parameters that will still allow the "Read Fields" functionality to work? QUESTION #2) Any feedback (ok/not ok) on trying to instantiate my custom Report Scriplet in the defaultValueExpression for parameters? Or alternate suggestions? BTW: I'm using iReport 4.5.0. Thanks!
  3. FYI: I found that if I try to instantiate my custom REPORT_SCRIPTLET in the parameter using something like this: <parameter name="ToDate" class="java.lang.String" isForPrompting="false"> <defaultValueExpression><![CDATA[new my.company.reports.MyReportScriptlet().getFormattedDate()]]></defaultValueExpression> </parameter> ...that appears to allow the "Read Fields" functionality to work. I'm guessing that is not the safest way becaues it looks like instantiating my custom report scriptlet myself ... causes certain other parameters that the report scriptlet methods might depend on ... such as REPORT_LOCALE may not get set propertly. But at least it seems to work for static/independent methods in the report scriptlet that perform simple functions that don't need other parameters or environmental settings.
  4. I'm running into a similar error when attempting to "Read Fields" using my custom Fields Provider. Ensuring that all the parameters in the report have valid defaultValueExpressions (as suggested above) seem to be doing the trick.... except when I try to use my custom REPORT_SCRIPTLET within the default expression, such as: <parameter name="ToDate" class="java.lang.String" isForPrompting="false"> <defaultValueExpression><![CDATA[$P{REPORT_SCRIPTLET}.getFormattedDate()]]></defaultValueExpression> </parameter> Is there a trick to ensuring that the REPORT_SCRIPTLET parameter itself is initialized?
  5. Hi, I'm trying to implement a "FieldsProvider" for my custom query executor... and it looks like I need to use the "com-jaspersoft-ireport.jar" just to compile my software. What are the licensing conditions for using "com-jaspersoft-ireport.jar" during compilation. It doesn't look like I will need to distribute this "com-jaspersoft-ireport.jar" file because users will just be downloading/installing iReport themselves. So please advise on any licensing conditions (if any) with just compiling with the "com-jaspersoft-ireport.jar" file (again, in order to implement my custom FieldsProvider as pointed out in this other forum posting: http://jasperforge.org/projects/ireport/tracker/view.php?id=4025) Thanks!
  6. I've implemented my own JRQueryExecuterFactory, JRAbstractQueryExecuter, JRDataSource, JRDataSourceProvider and FieldsProvider. Everything works great running report on my JasperReports engine on my server. Everything also works great when previewing reports through iReport. One thing that I can't get to work on iReport is the "FieldsProvider". That is, when I go the "Report Query" window to create/modify my report query, instead of having the "Read Fields" button enabled, the "Read Fields" button is disabled and there is a message saying: "No Fields Provider available for MY_QUERY_EXECUTOR queries!" Where MY_QUERY_EXECUTOR was defined via the Add/modify query executor dialog as: ----- Language: MY_QUERY_EXECUTOR Factory Class: com.mycompany.reports.jasper.data.MyQueryExecutorFactory Fields Provider class (optional): com.mycompany.reports.jasper.data.MyQueryFieldsProvider ----- Again, previewing reports in iReport using MY_QUERY_EXECUTOR is working fine. It just seems that my Fields Provider is not being recognized. I've added some debugging messages to my Fields Provider's "supportsGetFieldsOperation()" method and also to my Field Provider's "getFields()" methods.... but neither ever seem to be getting called. I don't see any other error messages/execeptions anywhere other than on the iReport "Report Query" window saying "No Fields Provider available for MY_QUERY_EXECUTOR queries!" I'm currently trying this on iReport 4.0... but I've also tried it on iReport 3.7.5 and iReport 3.0.0.... with similar results. Any suggestions on what might be the problem? And/or any suggestions on how get more debugging information from iReport? And/or any known issues related to the "Read Fields" functionality with custom query executors? Thanks for your time!
×
×
  • Create New...