Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with formatting numeric report field, please.

Status
Not open for further replies.

Stella740pl

Programmer
Jul 3, 2003
2,657
US

Hello, everyone!

My report has a numeric field that is currently formatted as #,###,###, and another one formatted as 9999.9, so they show minus signs for negative numbers.

Now I have a request to show also a plus sign for the positives. Short of making the whole field character, or putting the plus into a separate field, is there a format mask or a trick to easily achieve it?

Thanks.
 

Jim, I get the error when trying to REPORT FORM, not MODIFY REPORT.
 

OK, I get the error in both cases, when doing REPORT FORM and MODIFY REPORT, but to replicate that, I need to change your code a little:

Code:
USE dummy1.frx
REPLACE Expr WITH REPL('x',9999) [red]FOR objtype=8[/red]   
USE
MODIFY REPORT dummy1   &&  Here you go.
 

Do you have at least one field in your Dummy report (objtype=8)? If not, plese create, then try again.
 

Since I have not so many of those records with the length of Expr over 255, I am now trying to get around it by creating 10 more report variables. It looks like it might work.

I didn't want to do it at first, since I already have a lot of them, and those long expressions can be (and are) calculated from existing report variables, but since the whole construction gets out of hands, I didn't have much choice.
 

Jim, did you reproduce the error?
Or did it work differently in the VFP5?

 
Hi Stella,

Yes I did reproduce the error. The maximum length allowed seems to be 255. -Jim
 

Thanks. That's my experience, too - and seems to be confirmed in the link I posted above.

So I went with a workaround.
Thanks everyone for the ideas.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top