gerhard.heil Posted February 7, 2014 Share Posted February 7, 2014 Hi all,I have a report that retrieves 3 attributes attr1, attr2, attr3 from first database, including a subreport that retrieves another attribute attr4 from a second database, and calculates attr5 = attr 2 / attr4. That works so far; the values are displayed correctly.Now I want to sort the report by attr5. I found the <sortfield> tag, but I need to get the attr5 value from the subreport into the main report. The Return Values property of the subreport seems t do that work, but I get null as return value. In detail: I have defined a variable $V{returnvalue} in the subreport and a variable $V{returnvalue} in the main report; but I am confused, because in the Add/modify dialog for Return value definition I do not get that variable in the list of Subreport variables, the list contains only the five predefined variables PAGE_NUMBER, COLUMN_NUMBER, REPORT_COUNT, PAGE_COUNT, COLUMN_COUNT (the main report variable is selectable in that list). Should my variable be available in the selection list once I have defined it correctly?And certainly I need to set the Variable Expression in the subreport, but what is the correct syntay? I tried "$V[returnvalue}=$F[attr5}", "=$F{attr5}" , "$F{attr5}", without the apostrophes of course; none of them works.Thanks for any hint. 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