Jump to content
We've recently updated our Privacy Statement, available here ×

problem in subreport


starlaptop

Recommended Posts

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

 Since someone helped me out with something hard, perhaps I could help you out with something easier. Please be more specific about the details if I don't answer this one quite right.

Step 1. Make the subreport, dont add anything more to the subreport (eg. totals, averages, other calculations) other than the data, see this link for an example. https://learn.usf.edu/bbcswebdav/xid-3659976_1

 

Step 2
Set up your $V{variablename} Text Field on the main report see link and make sure expression class is integer.https://learn.usf.edu/bbcswebdav/xid-3659977_1

Step 3
Create the variable on the main report, for the variable expression, you have to add the function as well. see link, this function is going to direct the variable as to where to get the data.https://learn.usf.edu/bbcswebdav/xid-3659978_1

Step 4
Create the function $whatevernamehelpsyouremember, and be sure to add the paramater. I am pulling from an XML file, you might just need to pull it from the subreport, which I dont know your directory. For me its, /MercuryGate/Shipment/PriceSheets/PriceSheet/Charges/Charge/Weight  see the link.https://learn.usf.edu/bbcswebdav/xid-3659979_1

Step 5
if you are using xPath you must use a / on this screen, see link. This is a fancy wizard (not lol) to help you add the function. 
https://learn.usf.edu/bbcswebdav/xid-3659980_1

Best of luck to you, my example shows me not pulling count from the subreport, but from the sources of both the main report and subreport.


Link to comment
Share on other sites

I'm not a huge fan of the subreport function in Ireport, so I always try to find ways to avoid it :-). Try working this in your query, if possible, by using SUM OVER capabilities (Oracle) or whatever is equivalent in your SQL code.

 

David

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...