mulezz Posted October 22, 2008 Share Posted October 22, 2008 Hi,I am trying to pass a Field from SQL to a subreports, I already passed parameters to subreports but when I tried to give a field, I can't.I put on subreports parameters ($P{date}, $P{name}, $F{number}), I obtain this number for my select.On subreport I put on query: "select * from table where date=$P{date} and number=$P{number}" and I dont get results.I tried on subreport $P!{number}, $V{number}, $F{number} with no sucess.Thx in advance Link to comment Share on other sites More sharing options...
akash12_06 Posted October 22, 2008 Share Posted October 22, 2008 Where are you mapping your sub report parameteres with query result field ? you are running query in main report so when you are adding subreport, you need to add these parameters from parent report and need to map with query result. if you are using ireport, 1. when you will run query , the result will be there in fields. 2. When you will add subreport, do right click on subreport icon in parent report and go to add parameters for subreport. Click add parameter and assign values from field. 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