prinsesajade Posted April 22, 2009 Share Posted April 22, 2009 hi!does anyone have any idea on how i can do this or is this possible?here's the scenario..i have my main report which is a list of teams..for every team will be a subreport of the production of each team..so say for example in page 1 i have team A as the heading and its subreport, in page 2 will be team B and its subreport and so on..in my subreport i have these fields for regular work hours and night differential..a product can be created on a regular working hour or on night..so if it is created in regular work hour (10am-6pm) the field for night differential should not be displayed..the column should be hidden..now here's the problem..say for example in page 1, that is TEAM A, all products in that team was created in regular work hours so the night field should be hidden..in page2, TEAM B, there are some products that are created at night so night field is not hidden..any idea how can i do this?thank you.. Link to comment Share on other sites More sharing options...
prinsesajade Posted April 22, 2009 Author Share Posted April 22, 2009 i found the answer to my problem..what i did is i created 2 subreports.the first one was the subreport with the complete fields and the second report is the one without the night field(that was the field i need to hide)..then in my java class i created a condition and put the result in a map according to the team id..say for example TEAM A's products are all created in regular hours a set a boolean to true and otherwise false..then put it to map map.put(teamId, booelanValue)and put this map to my report parameters map..params.put("MAP", map)in subreport properties --> Subreport Expression i wrote a condition that if my parameter MAP returns true load subreport 2(night fields are hidden) otherwise load subreport 1(all fields are shown).. 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