cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically Set Field Size and Position

05-28-2021 12:24 PM
570 views 1 comments
0 Likes
SAP Managed Tags
Subscribe

Good Day,

Crystal 2016 v14 CR Developer

I have a Few DB Fields on a SubReport whose Size I want to change based on a True/False Variable that is passed thru.

I know you Right Click on the Field, Size and Position and then you can input Code for the Width Field, I'm just not sure how this code must look like.

I have tried the Following, but it doesn't seem to do anything and I'm also not sure what Unit of Measure is used, Inches or MM, where can I check this?

Width = 4.239 by Default

So if the Variable is True, I want to change the Width to 3.000 else just leave it as is if the Variable is False.

IF {@MeasurementVariable} = True then 3.000 (Doesn't Seem to Do Anything)

IF {@MeasurementVariable} = True then 3.000 else DefaultAttribute (Doesn't Seem to Do Anything)

IF {@MeasurementVariable} = True then 3.000 else 4.239 (Doesn't Seem to Do Anything)

What is the Correct Syntax to use here?

Thank You

Kennedy

0 Likes

Accepted Solutions (0)

Answers (1)

Answers (1)

DellSC
Active Contributor
0 Likes

<soapbox> When working with boolean objects that return either true or false, you do NOT have to use the "= True" syntax. This means the first part of your formula should be

IF {@MeasurementVariable} then 3.00

</soapbox>

However, I don't think this is the real problem. I would put {@MeasurementVariable} on the report so that you can validate what the value is.

-Dell