Pergunta

My question is similar to this one here

The differences are that I'm on ActiveReports 7 instead of Crystal Report and that I'm using multiples SubReport on the same page...

[Edit]: I found it !

In the event "detail_Format" of my subreport, I used this code below to calculate how many rows by columns.

private int count = 0;
public void Detail_Format()
{
int maxElement = (result.Count() / this.detail.ColumnCount);

    if (count == maxElement)
    {
      this.detail.NewColumn = NewColumn.After;
      count = 0;
    }
    else
    {
      this.detail.NewColumn = NewColumn.None;
      count++;
    }    
}
Foi útil?

Solução

You may use the following code snippet in the Script tab to add a pagebreak after every ten records :

int i = 0;
public void Detail_Format()
{
    i = i + 1;
    if(i > 9)
      {
         this.Detail.NewPage = GrapeCity.ActiveReports.SectionReportModel.NewPage.After;
         i = 0;
          }
    else
      {
         this.Detail.NewPage = GrapeCity.ActiveReports.SectionReportModel.NewPage.None;
          }
}

Regards, Mohita

Outras dicas

There is a problem when I split my data into column. On each new page, the first row of data isn't splitted into column... I don't understand why ?

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top