gombs Posted February 13, 2007 Share Posted February 13, 2007 Hey, I want to work with $V{REPORt_COUNT} from my subreport , I create a variable and returned it. But it works only when I printed it in summary or title or anything, I wantend to print it in detail under the subreport ( fillig is horizontal ) why it not works? Ok I dont want to print it realy I wanted to use in my second subreport, also I wantend to get it from first subreport and give this value to my second subparameter as parameter...it doesn't works :-(( Link to comment Share on other sites More sharing options...
bobh Posted February 13, 2007 Share Posted February 13, 2007 Hi, Set your variable Reset Type property to Report and Calculation Time property to System ... Roberth Link to comment Share on other sites More sharing options...
gombs Posted February 13, 2007 Author Share Posted February 13, 2007 this options I have already selected it not works...I watched for solution in demo/samples/subreport but the example is already only for using in title... Link to comment Share on other sites More sharing options...
lucianc Posted February 13, 2007 Share Posted February 13, 2007 Set evaluationTime="Band" for the text field where you display the value returned from the subreport. HTH,Lucian Link to comment Share on other sites More sharing options...
gombs Posted February 14, 2007 Author Share Posted February 14, 2007 thank you =) It works in Masterreport, but in my second subreport I get null back, like before my change. Greets gombs Link to comment Share on other sites More sharing options...
lucianc Posted February 14, 2007 Share Posted February 14, 2007 What exactly are you doing in the second subreport? Can you post a sample or at least relevant JRXML fragments? Regards,Lucian Link to comment Share on other sites More sharing options...
pandukaS Posted May 27, 2007 Share Posted May 27, 2007 Thank You LucianC!!!!!:woohoo: I had the same problem and Ispend hours to see a solution Thank you again Panduka(Evaluator) Link to comment Share on other sites More sharing options...
smiscik Posted August 2, 2007 Share Posted August 2, 2007 I have similar problem with returning report_count.I have subreport in band, and subreport is returning REPORT_COUNT. I want this variable use for band print expression, only print it when there are any records.But in time when this expression is executed this variable is null.Return variable has set calculation type to system and reset type as report. This variable can be used in others bands with correct value, but I need it in actual band containing subreport. Link to comment Share on other sites More sharing options...
lucianc Posted August 2, 2007 Share Posted August 2, 2007 smiscik wrote:I want this variable use for band print expression, only print it when there are any records. This will not work since the print when expression is evaluated before the subreport is filled and the value returned from it. Regards,Lucian Link to comment Share on other sites More sharing options...
smiscik Posted August 2, 2007 Share Posted August 2, 2007 ThanksHave any idea how can I get similar functionality?Scriptlet?I need it for reports with DB and XML data source. (they are not both in one report) EDIT1:with XML data source I made field which count desired elements Code:count(/xy).Now I must make up something to get number of records from DB.Post edited by: smiscik, at: 2007/08/02 11:46 Link to comment Share on other sites More sharing options...
lucianc Posted August 3, 2007 Share Posted August 3, 2007 Well, the DB equivalent of XPath count(..) is a select count(*) .. which you would execute via the report's scriptlet (or other utility classes). I'm afraid that there's no other solution since the the subreport query gets executer after the band's print when expression is evaluated, so it's not possible to use the result of the subreport query in the parent's band print when expression. Regards,Lucian 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