Example 5. Shifting the print position

Top  Previous  Next

In this example, we will show how to shift the position of a band manually, by using the Engine object. We will be using:

 

BeforePrint band event;
Engine object.

 

Create a simple report of the following appearance:

 

scriptEvents1

 

Create a BeforePrint event handler for band:

 

private void Data1_BeforePrint(object sender, EventArgs e)

{

  Engine.CurX = ((Int32)Report.GetVariableValue("Row#")) * 10;

}

 

If you run the report, you will see the following:

 

scriptExample5_1