Page 1 of 1

Running Number in DataBand

Posted: Wed Feb 12, 2014 1:45 pm
by PJoyeux
Hi,

I need a running number in a DataBand. The report is grouped and I want to have the running number to start with 1 in each group like this:

Code: Select all

[Group 1]
  [1]  <- Field showing the current running number
  [2]
  [3]
[Group 2]
  [1]
  [2]
[Group 3]
  [1]
  [2]
  [3]
  [4]
...
I have tried to use "{CountRunning(GroupHeaderBand1)}" but the running number does not revert back to 1 when the group changes.

How can I best achieve this?

Cheers,
Pascal

Re: Running Number in DataBand

Posted: Thu Feb 13, 2014 12:03 pm
by Alex K.
Hello,

Please try to use the following code in AfterPrint event of GroupFooter component:

Code: Select all

TextComponent_Count.RunningTotal = false;
TextComponent_Count.Init();
Where the TexComponent is text component with countrunning expression.

Thank you.

Re: Running Number in DataBand

Posted: Thu Feb 13, 2014 4:03 pm
by PJoyeux
Thanks that worked!
I would never have known that I have to add "_Count" to the name of the component...

Where can I read more about coding events, how to access components and how to know what component-names to use?

Thanks,
Pascal

Re: Running Number in DataBand

Posted: Fri Feb 14, 2014 6:22 am
by Alex K.
Hello,

Most probably, this solution is not described in the documentation. But we are constantly improving videos and documentation and other additional resources. It simply takes time.
You can find also more information about the product in our blog and forum.

Thank you.