Jump to content

Hide Details contained in a band when print when expression


eduardo.openbravo

Recommended Posts

Hi,

I have the following problem:

 

I have a detail and a group band. Details show invoices and its related payments. Band (group) shows summarized info containing open balance for the invoice (invoice amount - sum(paymentAmounts)).

I would like to hide both band and details within the band based on the open balance for the invoice (group). The idea is not to show invoices which has been fully paid (open balance = 0)

When using Print When Expression fro the band, it works perfectly and hides the band line, but it does not hide the details contained in the band. If I try to apply the same print when expression for the details, just las detail line is hidden as just for that line the variable changes value to 0. I would need the print when expression for the detail to eval the variable once the full group has been computed.

Ex:

Invoice     Inv. Amount      Payment   Pay. Amount

1                     100

                                                      1                  100

totals:              100                                         100            Balance: 0

 

Being the first two lines the details and the third one the band summary line.

Can anyone give me a hand on this?

 

Thanks in advance

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

As you hinted at, I'm thinking the variable you are using in your "Print when" condition isn't zero until the last detail row. That is why the last row is not displayed, but the other ones are. In your example line 1 detail would make your variable = 100, line 2 detail would make your variable = 0 hence the reason it is not printed. 

Your solution might be a simple thing like changing the reset type of your variable. Another option would be to put both of your group band and detail band in a subreport, and use the same "Print When" condition to display the subreport or not.

I hope this helps, let me know how it goes.

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