Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

PrintWhen

edited July 2003 in General
is there an event equivalent to the AceReporter band.OnPrintWhen :boolean ?
basically what I want to do is hide the detail band (and not add for calc
components for group totals for that hidden detail band).

it would look something like this I suppose:

TForm1.ppreport1Detailband1Printwhen(Band: TppDeatilBand; var Result:
Boolean);
begin
Result := true;

if DataSet.FieldByName(test').asstring = 'N' then
result := false; // band is hidden and calcs don't calc
end;


thanks, Jon

Comments

  • edited July 2003
    Hi Jon,

    I looked into the issue you are having and it looks as though the OnCalc
    event for variables fires before the DetailBand.BeforePrint does so even if
    you could toggle the visibility of the detail band at certain times, you
    would not be able to suppress the calculations of the components inside.
    Your only other option would be to keep track of the values that get created
    in the detail band that you want to hide and subtract them from the totals
    at the bottom of the report.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2003
    Jon,

    You might also check in the OnCalc for the same conditions you check in the
    BeforePrint event.

    HTH

    -Jack

  • edited July 2003
    Thanks guys.

    Overall, I think RBuiler is a much better product, but,
    (I hate to say it) that's one over RBuilder via Ace.

    Maybe one for the Digital Metaphor's designers to consider for a future rev?

    Thanks again,

    -Jon


  • edited July 2003
    Thanks for the suggestion.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.