marianela Posted March 22, 2007 Share Posted March 22, 2007 Hi everyone¡¡ Sorry to bother you with this (apparently silly) problem, but I hope some body can help me...I have a report that has a group and in the detail band has a subreport. What I want at first (and already achieve) is to return the REPORT_COUNT from the subreport to master report.Now that I have that variable in my master report, I want to use it in an expresion that let me not print the groupheader if there is no data return by the subreport.I think that maybe this expreesion should work:Code:( $V{SubrptCount}.intValue()==0 ? Boolean.FALSE : Boolean.TRUE )But I was wrong.. :( Then I think that could be something like...Code:[code]new java.lang.Boolean($V{SubrptCount}.intValue()!=0)But this didn't work either..I don't understand what is the problem, but when I use any of those espression it oly works with some records..It's like some numbers (167,133,etc) are taking like 0 and some 0 are taking like others...:blink: I know this sound a little confuse...but this is my problem...Pleaseee I really need help..Anything will be appreciate Marianela Link to comment Share on other sites More sharing options...
cHaOs667 Posted March 26, 2007 Share Posted March 26, 2007 I don't know if i understand your problem correctly but have you tried the following expression? Code:new Boolean(!$V{SubrptCount}.intValue() == 0) Link to comment Share on other sites More sharing options...
marianela Posted March 28, 2007 Author Share Posted March 28, 2007 Hi cHaOs667, Thanks a lot for your answer...I tried use your idea but I obtain the following error...Code:it.businesslogic.ireport.ReportClassLoader@14f1544 net.sf.jasperreports.engine.JRException:ÂErrorsÂwereÂencounteredÂwhenÂcompilingÂreportÂexpressionsÂclassÂfile: 1.ÂTheÂoperatorÂ!ÂisÂundefinedÂforÂtheÂargumentÂtype(s)Âint valueÂ=Â(java.lang.Boolean)(newÂBoolean(!((java.lang.Integer)variable_SubrptCount.getValue()).intValue()Â==Â0)); ...ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ3Âerrors ... ÂÂÂÂ Any suggestion??? anyone???Pleaseeeee, I really need help.Thanks in advanced,Regards,Marianela;)Post edited by: marianela, at: 2007/03/28 16:17 Link to comment Share on other sites More sharing options...
aniruddh4u Posted March 28, 2007 Share Posted March 28, 2007 instead of new Boolean(!$V{SubrptCount}.intValue() == 0) use new Boolean($V{SubrptCount}.intValue() != 0) -- Aniruddh Link to comment Share on other sites More sharing options...
marianela Posted March 29, 2007 Author Share Posted March 29, 2007 Hi aniruddh4u,Thanks a lot for your awswer, but I'm still having my problem... I decide to look for another way to achieve what I need. Thanks a lot again... Regards,Marianela;) Link to comment Share on other sites More sharing options...
cHaOs667 Posted March 30, 2007 Share Posted March 30, 2007 Could it be that your SubrptCount Variable is of type string and not int? If you want to look if youre sting variable is NOT empty then use:Code:new Boolean(!$F{SubrptCount}.equals(""«»)) 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