Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error in custom Evalutate contents with 2 tables
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Error in custom Evalutate contents with 2 tables
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01159402
Message ID:
01159402
Views:
53
This code works with ZERO problems when there is just one table. I am trying to reuse this with a report that uses two tables (one for the header of the report, one for the detail).

It looks for the '**-DIRECTIVE-NEGATIVE' in the user field for the element to apply some custom formatting. However, what it puts out is simply 0.00. I have been able to determine that somehow '**********' is being placed in the toObjProperties.Text property. But when I look at the table itself, it shows proper data. What am I missing?

Here's the code:
lnLines = ALINES(laLines, loFRX.User)
IF lnLines > 0
	FOR lnLoopCount = 1 TO lnLines
		
		DO CASE
			CASE ALLTRIM(laLines[lnLoopCount]) == '**-DIRECTIVE-NEGATIVE'
				
				TRY
					lblnNegative = (VAL(toObjProperties.Text) < 0)
					lblnIsNumber = TRUE

				CATCH	&& For invalid datatypes
					lblnNegative = FALSE
					lblnIsNumber = FALSE

				ENDTRY

				IF lblnNegative
					toObjProperties.Text = '<' + ;
						ALLTRIM(;
							TRANSFORM(ABS(VAL(toObjProperties.Text)),;
							 		"@R 999,999,999,999,999.99");
							 )  + '>'
					
					toObjProperties.PenRed = 255
					toObjProperties.PenGreen = 0
					toObjProperties.PenBlue = 0

					toObjProperties.Reload = TRUE

				ELSE
					IF lblnIsNumber
						toObjProperties.Text = ALLTRIM(;
									TRANSFORM(ABS(VAL(toObjProperties.Text)),;
									 		"@R 999,999,999,999,999.99"))

						toObjProperties.Reload = TRUE

					ENDIF
				ENDIF
		ENDCASE
	NEXT
ENDIF
TIA
Richard
State of Florida, DCF
Next
Reply
Map
View

Click here to load this message in the networking platform