Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print When
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Miscellaneous
Thread ID:
00458521
Message ID:
00458579
Views:
12
>Hi Everyone:
> I have this code in my report in the Print When section.
>
>*// code
>IIF(Between(creport.type,1,2),"L",IIF(creport.type=5,"M",IIF(Between(creport.type,6,9),"D","")))
>I want the report to display "L","M" or "D" depending on the value in creport.type.
>
>However, when I run the report I am getting nothing, The field is blank. It should not be blank, becaue I know that there are two record in my cursor (creport). The values of type in creport are 1 and 5. Can anyone tell me why I am not getting the correct result.
>Thanks
>MA


"Print When" is not the place to be adding your code. Print When determines WHEN an item should be printed on the report -- not WHAT should be printed on the report.

You need to move your IIF() expression to the "expression" portion of the object you are printing and get rid of the "Print When" logic. That should take care of your problem

Cathy
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Previous
Reply
Map
View

Click here to load this message in the networking platform