The Algorithm Blog

Crystal Reports: IN and NOT IN Record Selection

Many of Algorithm's customers use Crystal Reports as their reporting platform. It is a mature platform with a large user base and is a great tool for report writing. A customer recently ran into a syntax issue while using Crystal Reports so we wanted to share the resolution.

The proper Crystal Reports syntax for searching using the NOT IN operator is different than the IN operator.

Example for IN Syntax: 

RecordSelectionFormula = "{ERPtable.field2}in [ " & xyz & "]".

If a NOT operator is merely added to this formula (e.g. RecordSelectionFormula = "not {ERPtable.field2}  in [ " & xyz & "]" ), it fails with a boolean or string expected error message.

Example for NOT IN Syntax:

not({table.field} in ["A","B","C"]).

IN and NOT IN are a means to select clusters of records that cannot all be selected using the = or Between operators.

About Crystal Reports

As a trusted name in reporting, IT professionals have been using Crystal Reports software for years to create powerful, user-friendly, and dynamic reports from virtually any data source. Users are able to transform big data into richly formatted reports and deliver actionable information to others, inside and outside the organization.

SAP Crystal Solutions resized 600

Crystal Reports Features:

  • Design interactive reports connected  to virtually any numerical data source
  • Use on-report sorting and filtering to execute financial decisions instantly
  • Make compliance easier by sharing regulatory reports externally over the web, via e-mail, or embedded within familiar productivity applications
  • Enable anyone to open and interact with your reports online or offline while preserving the interactivity, drill-downs, and visualizations
  • Answer more business questions with fewer and more flexible reports, reducing dependency on IT support

 

 

Subscribe to Our Blog

Recent Posts