Jump to content
JasperReports Library 7.0 is now available ×

problems with NULL and BLANK objects


dr_pompeii

Recommended Posts

Dear Members

i work with jasperreport and ireport

i have the next situation, the only way to explain this is with pics

the case is that a customer can buy many motorcycles 1 to 4
and 0..N motorcycles parts in the same buy

the sql query is a union of 2 select
like (SELECT....)UNION(SELECT....)

why in this way?, the reason that the first SELECT is to get all the motorcycles
to sell (the minimum is 1) and the second SELECT is for the motorcycles parts
(0 to N, thats the problem)

ok with the theory, pls
see ireport.PNG, thats the ireport editor,
both circles (color red,green) are located
in the Detail Band,
the red are for motorcycles and green for motorcycles parts

when i execute the JasperViewer
i get this

page1.PNG,
page2.PNG (practically a white page with the bottom with the data of the all price to pay of the buy)

maybe you are asking why the behaviour of the page2.PNG
the reason is for the (SELECT....)UNION(SELECT....)
it gets a lot of NULL results, but i have for all Detail Band objects
the option Blank when null and remove line when blank

i dont have some idea how to resolve this,
please help, maybe some option in ireport that i unknown is there
i cant change my query because the report is very special

my object is get page like ideal.PNG (edited by hand of course)

thanks so much in advanced

[file name=good.gz size=76710]

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Sorry I can not open your compressed file but I think i understand your issue.

 

Foe the details you could put your query in a subreport. You can then set the subreport element to "Remove line when blank".

Link to comment
Share on other sites

Hello svenn

 

thanks for the reply

 

Sorry I can not open your compressed file but I think i understand your issue.

why?, i compressed in linux but winzip can open, wondered why you cant

 

Foe the details you could put your query in a subreport. You can then set the subreport element to "Remove line when blank".

i see, but sadly i cant integrate yet Spring with subreports with JR

 

only i can work in peace Spring with JR

 

other approach , i appreciate

 

regards and thanks in advanced

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...