Band Method

[Top]  [Chapter]  [Previous]  [Next]

Applies to

IWPReport

Declaration

function Band(Index: Integer): IWPReportBand;

Description

Retrieve the interface of one of the bands at the highes level in the template editor (#1). This can be used to change the properties of bands using code. Also see Band.Band() and property BandCount.

 

This C# example recursively loops through all the bands in the report and prints the names in Editor #2.

 

private void listband(IWPReportBand band, int d)

{

 int i;

 int bc = band.BandCount;

 for (i = 0; i < d; i++)

  wpdllInt1.Memo2.TextCursor.InputString("  ",0);

 wpdllInt1.Memo2.TextCursor.InputString(

  band.Typ + "  " +  band.Name + "\r",0);

 for (i = 0; i < bc; i++)

   listband(band.Band(i),d+1);

}

private void ListBands_Click(object sender, System.EventArgs e)

{

 IWPReport Report = wpdllInt1.Report;

 int bc = Report.BandCount;

 wpdllInt1.Memo2.Clear(false,true);

 for (int i = 0; i < bc; i++)

    listband(Report.Band(i),0);

 wpdllInt1.Memo2.ReformatAll(false,true);

}


[idh_iwpreport_band.htm]    Copyright © 2007 by WPCubed GmbH