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

Toggle visibility detailband (Skip detailband for printing) in detailbands variable.OnCalc

edited January 2009 in General
Hi,

I have a variable (CalcType veTraversal/ResetType veReportEnd) on a
detailband with an OnCalc event. In this event the variable is set to 0/1
depending on the result off some calculation. When printed the value off the
variable is correct for each detailband.
Now I need to toggle the visibility off the detailband depending on the
value off this variable.

I tried to toggle the visibility off the detailband in the variable.OnCalc
event which doesn't work
I tried to toggle the visibility off the detailband in the
detailband.BeforePrint event which doesn't work
I tried to toggle the visibility off the detailband in the
detailband.BeforeGenerate event which doesn't work

I tried to set the BandsPerRecord off the detailband to 0/1 in above events
but that didn't work either

So how do i use the value off a variable calculated correctly per
detailband, as a mean to control the visibility of that detailband?
Is there another way to skip a detailband for printing?

Greetings

Comments

  • edited January 2009
    > I tried to toggle the visibility off the detailband in the

    Without knowing much about your variable, I would have thought this would
    have worked.

    Can you set the .Visible property based on the same conditions of the
    variable?

    Ed Dressel
    Team DM
  • edited January 2009
    Sure, it is like that

    This is the test i use in all events i tried

    DetailBand.Visible := Variable.AsInteger = 0;

    PrintOut shows rows where Variable.AsInteger = 1



This discussion has been closed.