| **Navigation:**  [[templates.htm|Templates]] > Guide to all Templates > [[additional libraries and templates.htm|Additional Libraries and Templates]] > Crystal8 Class >====== SelectionFormula (retrieve or set the Crystal formula ) ====== | [[query retrieve or set the sql data query .htm|{{btn_prev_n.gif|Previous page}}]][[additional libraries and templates.htm|{{btn_home_n.gif|Return to chapter overview}}]][[showdocumenttips show tips on docuement in the preview window .htm|{{btn_next_n.gif|Next page}}]] | | || **SelectionFormula**(| //formulastring// |) **SelectionFormula**** Set or retrieve the Crystal formula.** //Formulastring//  A string constant, variable, EQUATE, or expression containing the Crystal formula. This parameter is optional. The SelectionFormula method is used to either get or set the report's formula used to limit retrieved records. If the //formulastring// is omitted from the method call, the current formula is retrieved. **Return Data Type:** STRING **Example: ** **formula = oCrystal8.SelectionFormula()!retrieve selection formula into formula variable** **formula = '{{Customer.Country} in ["Australia"]' ! SQL query** **oCrystal8.SelectionFormula( formula ) ! Set the query**