Crystal Reports for Eclipse Developer Guide

To set a page margin condition formula with the PrintOutputController class

  1. Retrieve the PrintOutputController object.
  2. Create a new IConditionFormula object.
  3. Set the formula syntax and text.
  4. Use the PrintOutputController.setPageMarginFormula method to modify the page margin conditional formula.
Example: 
This sample creates a formula that checks whether a page number is even or odd and sets the margins accordingly: if the page is an even number, the margin is set to one inch; if the page is an odd number, the margin is set to two inches. The formula is applied to the left margin of the report.
void SetPageMarginFormula(ReportClientDocument clientDoc)
{
  PrintOutputController printOutputController = clientDoc.getPrintOutputController();
  IConditionFormula condFormula = new ConditionFormula();
  String formulaText = "If Remainder(pagenumber,2) = 0 then 1440 else 2880";
  condFormula.setSyntax(FormulaSyntax.crystal);
  condFormula.setText(formulaText);
  printOutputController.setPageMarginFormula(PageMarginConditionFormulaType.left, condFormula);
}



SAP BusinessObjects
http://www.sap.com/sapbusinessobjects/
Support services
http://service.sap.com/bosap-support/
Product Documentation on the Web
http://help.sap.com/