Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SUM
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Re: SUM
Miscellaneous
Thread ID:
00458413
Message ID:
00458414
Views:
16
>>>>>>>>>>>>>>>
Hi All:
I have data in my cursor called creport
and I am populating my report with this cursor. I have 2 questions:


1) I am using SUM function in the report designer to calculate the sum of my 'hour' column. For example, SUM(creport.hours). (Hours are numeric value) I am getting an error "SUM.prg does not exist" How can I calculate the sum of the values on the report?

>>>>>>>>>>>>>>>>>
1. Try SUM(creport.hours) as nHours

>>>>>>>>>>>>>
2) I have a variable named 'ntype'. Ntype has numbers from 1 through 5. Example: 1 = Material 2=Labor 3= Direct etc. I want to place the definition of my ntype (material, labor, direct) in my report. How can I accomplish this???

Thank you
>>>>>>>>>>>>>>>>
2. In the PrintWhen of your field on the report use:

IIF(nType = 1,"Material",IIF(nType=2,"Labor",IIF(nType=2,"Direct",""))) etc.


MA
Previous
Reply
Map
View

Click here to load this message in the networking platform