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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP9 Report only displays uppercase text on a field when previewing.

Status
Not open for further replies.

Luiz Eduh

Technical User
Jan 10, 2012
51
US
Hello,

I have designed a report in VFP9 where I grab the data from a table. The table stores a list of product and have a Character field named category which categorizes the product. Im using uppercase 'A', lowercase 'a', uppercase 'W' and lowercase 'w' on that category field. Anyways on my report I have the field category but when I preview it it only gives me the uppercase products. Im not sure how to fix this. Any help will be much appreciated.

Thank you
 
I'd first open up the Report Form in VFP's Development mode and look at the Font which is being used.
There are some Fonts which are shown as UPPERCASE only (such as: Algerian, Castellar, and others).
If that is the case, change Fonts and try to run the report again.

Alternatively I'd put a SET STEP ON into the code immediately before you issue the REPORT FORM command.
When running the code in the Development mode, it will SUSPEND execution and automatically open the TRACE Window.
From there you can go to the Command Window and BROWSE the report's data table and see if the field values are all UPPERCASE.
If that is the case, then your code is causing the problem somewhere.

Good Luck,
JRB-Bldr

 
It could be as simple as the format of the report control has the format option "To upper case" ticked, so all values are upper cased.

Bye, Olaf.
 
Thanks I actually found the data in the report, but im kinda confuse. Before running the report im sorting the data before and putting it in the table with order by category asc, but when I see the data on the report all the products with caterogy "A" and "W" show first and then on then on the bottom the products with category "a" and "w". Im not sure why? isnt it should order them first all the A's upper and lowercase then the rest? this is confusing.
 
Ah, simply a sort order issue.

Either get used to VFP sorting by ASCII code, so uppercase comes before lowercase, or SET COLLATE TO "GENERAL" to sort case insensitive.

Just be warned your query optimization is lost, when your collation differs from index collation indexes are not used for Rushmore query optimization.

Before you reindex everything with general collation and make that the default collation of VFP for sorting, a better compromise is to keep collation at machine, keep all indexes as they are and ORDER BY UPPER(field) or LOWER(field), which also makes the sorting case insensitive by forcing one case. It doesn't matter whether upper or lower.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top