Accessing fields from your Crystal Report in the code

NicoVB

Well-known member
Joined
Jan 2, 2002
Messages
160
Location
Belgium
I have a Crystal Report with some fields. But I want that when a field has a certain value like for example "Nico", I can highlight the row by setting its text style value to BOLD.

But how do you achieve this???
 
Open the report. You can do this in VS.Net or outside of the project if you have another version of CR.

Find the field you want on the report in the designer window. Right click on it. Click Format > Font.

Set the Style to Bold. Find the "Formula" button next to the "Style" drop down. The button has a picture of a pencil with "X-2" printed over it. Click the button to get the formula editor.

In it type this:
Code:
  if [i]{your_field}[/i] = Nico then
     1
  else
     0

Dont forget: you must include the curly braces for data field names {} and the @ sign for parameter fields
 
Back
Top