Question

I am using Visual Foxpro 9, I want to print Unicode chars in report (frx). There are some ways to extend report listener to show unicode. I need the code to extend/show reportListner to show unicode.

Was it helpful?

Solution

I've never had to work with Unicode within VFP either, or spent any time working with Reports, but the Help for the Render method of the ReportListener does mention Unicode:

cContentsToBeRendered

Indicates the text to be rendered for Expression (Field) and Label layout elements.
For Picture layout elements sourced from a file, cContentsToBeRendered contains the filename.

When specifying a filename for an image, ReportListener provides cContentsToBeRendered 
as a DBCS string, which is the standard format for strings in Visual FoxPro. 
However, when indicating text to be rendered, ReportListener provides 
cContentsToBeRendered as a Unicode string, appropriately translated to the correct 
locale using any regional script information associated with this layout control in 
its report definition file (frx) record. 

If your derived class sends the text value through some additional processing, such as 
storage in a table, you can use the STRCONV() function, and its optional regional 
script parameter, to convert the string to DBCS first. For more information, see 
STRCONV( ) Function.

OTHER TIPS

Although I could be incorrect, but I believe VFP does NOT support UniCode and only works with the base ASCII character set. But then again, I've never needed to use Unicode either and have used FoxPro since the beginning of its lifetime.

I would imagine Rick Strahl's article Using Unicode in Visual FoxPro Web and Desktop Applications would be fairly definitive on the topic.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top