I wanted to hide text fields in jasper i-report when they are empty.
So I put this expression in those field's Print When Expression
$F{field_cashPaymentReceiptMode} != null && !"".equals($F{field_cashPaymentReceiptMode})
But then I got an error while compiling the report.
net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files
value = ((java.lang.String)field_cashPaymentReceiptMode.getValue())!=null &&!"".equals(((java.lang.String)field_cashPaymentReceiptMode.getValue())); //$JR_EXPR_ID=33$
<-------------------------------------------------------------------->
1 errors
Please help me.
Eliminate the Print When Expression altogether.
Check Blank When NULL.
Optionally, check Remove Line When Blank (only use this if you want the field to disappear completely, rather than retain its space on the page but have no content).
Try changing the order:
... && !$F{field_cashPaymentReceiptMode}.equals("")
If that doesn't help:
This could also depend on your JDK (1.7 / 1.8) version as seen in this question. When using 1.8, try downgrading to 1.7 if possible. This happens because of new default methods in interfaces in 1.8.
Related
I am using Jaspersoft Studio 6.6 and try to add own functions to the Expression Editor.
Therefore i follow the tutorial Jaspersoft Studio Expression Editor: how to extend it and contribute your own functions (part 2) - updated for version 5.5 (i was not able to find a more current version so i guess this one should be still correct)
All works fine but i had to replace the language of the generated report (SampleFunctionsReport.jrxml) from groovy to java to get rid of class not found exceptions
Finally the following Errors are remaining:
Description Resource Path Location Type
The method HELLO_WORLD_MSG() is undefined for the type SampleFunctions_1541665022158_603382 SampleFunctionsReport.jrxml /MyFunctions line 37 JRXML Problem
The method HELLO_WORLD_MSG() is undefined for the type SampleFunctions_1541665022158_603382 value = HELLO_WORLD_MSG( ); SampleFunctionsReport.jrxml /MyFunctions line 0 JRXML Problem
The method REPEAT_MSG(String, int, boolean) is undefined for the type SampleFunctions_1541665022158_603382 SampleFunctionsReport.jrxml /MyFunctions line 52 JRXML Problem
The method REPEAT_MSG(String, int, boolean) is undefined for the type SampleFunctions_1541665022158_603382 value = REPEAT_MSG("A message that will be probably repeated",5,true); SampleFunctionsReport.jrxml /MyFunctions line 0 JRXML Problem
I checked the points of the tutorial a couple of times...
can someone reproduce my problem?
What am i missing?
<import value="test.customfunctions.*"/>
this is the code from my jrxml, which is fine.
when i tried to enter the full class name - i got an error, that the package cannot be added.
today i tried the same again - and its working. even the resulting XML is identical!
I am trying to use List into the jasper report using JasperSoft Studio, but while defining dataset the JRDataSource expression is showing as invalid even after casting REPORT_DATA_SOURCE to the JRXmlDataSource(find image below).
Expression
((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("/Header/FileName")
Error
The current expression is not valid. Please verify it!
The error is looking so weird and I am not able understand it what is wrong here.
Do not worry about it, this is a bug in the IDE.
If you can't close the expression editor, edit the expression manually in the xml view.
In the SuiteCloud Eclipse IDE for NetSuite, what is the Ignore List setting under Preferences > NetSuite > Validation? Is it a single file that behaves like, say, a .gitignore? Or is it an explicit list of files to ignore?
I suspect this setting is why Eclipse is always building libraries and other files I've explicitly told it not to in my NetSuite projects.
Can anyone provide some clarity on the usage of this field?
Attempt 1
I tried setting this preference to a single file with the following contents:
**/*.min.js
**/*.lib.js
**/docs/**
**/Third Party/**
**/node_modules/**
**/bower_components/**
**/*jquery*
**/*moment*
**/*lodash*
But that does not seem to work as expected. Files that should be caught by these regexes are still validated. One of them in particular (docstrap.lib.js) crashes the entire IDE every single time when the SuiteScript validator encounters it.
Attempt 2
I tried to put a similar string of regexes directly into the field itself:
**/*.min.js,**/*.lib.js,**/docs/**,...
but this just yields an error directly in the dialog itself: Value must be an existing file
Attempt 3
Created a new SuiteScript project with only blanket.min.js in the project root. Added an ignore file with the following contents:
/blanket.min.js
./blanket.min.js
*blanket.min.js
blanket.min.js
"blanket.min.js"
*blanket*
**/blanket*
*/blanket*
.\blanket.min.js
**\blanket*
*\blanket*
\blanket.min.js
\blanket*
.\blanket*
C:\Development\Projects\validator-test\blanket.min.js
C:/Development/Projects/validator-test/blanket.min.js
blanket.min.js still gets validated. Completely lost as to how this ignore file should be formatted.
The ignore list is used by the SuiteCloud IDE (IDE) to avoid having errors in the IDE for non-standard script ids in SuiteScript 1.0 APIs.
As an example...
nlapiLogRecord('customrecord_foo');
Since customrecord_foo is a non-standard record, it will be marked as an error by the IDE.
To tell the IDE to ignore customrecord_foo, the ignore list can be used.
It's a text file, with one script id per line.
customrecord_foo
customrecord_bar
The specified non-standard script ids in the ignore list file will not be flagged as an error by the IDE.
I am new to iReport and all I have done so far is simply run an already compiled report. In fact it's a report that we are currently using so there should not be any issue. Though, when ever I run the report I get thrown this error message
Compiling to file... C:\Program Files\Fishbowl\reports\Custom\PackingListTacticalMedical2015.jasper
Compiling subreports....
Subreport C:\Program Files\Fishbowl\reports\Custom\SOPackingListTacticalMedical2015.jrxml already compiled.
**Unable to locate the subreport with expression: "$P{cbLayoutFormat}.equals("standard") ? $P{path} + "POPackingList.jasper" : $P{cbLayoutFormat}.equals("carton") ? $P{path} + "cartonPOPackingList.jasper" : $P{path} + "POPackingListLoc.jasper"".**
Compilation running time: 13,619
The report does still run and compile but when ever I am prompted to "Enter a shipID" - and I do- the results are blank. I know what the message is saying, I just simply do not understand what it means.
Thanks to anyone that can help with instructions or explanations on this.
Try to change expression datatype of your subreports to InputStream instead of String (path), and then passe your subreport as input stream as a parameter.
Put your subreport in the resources dir. and compile it.
InputStream subReportStream=getClass().getResourceAsStream("subReportName.jasper");
params.put("SUBREPORT_STREAM", subReportStream);
this work fine for me.
With the way Fishbowl inserts it's run path into the $P{path} parameter you need turn off the compile subreports option when compiling and making changes to the the report. Also with the manner in which Fishbowl overrides the parameters at runtime you'd have to know all of the database ID's you're looking for if you want to run it from within iReport instead of inside Fishbowl.
The easiest work around for this is to have the reports compile to the their working directory and you can refresh inside Fishbowl as you compile changes to the reports.
when I 'm compiling my project in B4A using the obfuscated option, I get the below error:
Compiling generated Java code. Error
B4A line: 6
Dim ActivityResponse As String: ActivityResponse=\
javac 1.6.0_26
src\adamioan\cinemattica\com\actmovie.java:1192: array dimension missing
_vvvvv3 = BA.__b (new byte[] }, 680010);
^
1 error
This error occures only with the obfuscated option; debug and simple compilation work great.
Why is this happening?
Seems like a bug in the obfuscation feature related to empty strings. It will be fixed for the next update. Note that there is no need to assign empty strings as this is the default value. So for now just remove the assignment.
Thank you both, it was my mistake. In the Process Globals I declared the variable ActivityResponse and in the same line I set this to "".
Dim ActivityResponse as String: ActivityResponse = ""
That was the problem. Thanks again.