Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ReportListener did work when output to html
Message
From
30/05/2006 07:14:58
 
 
To
30/05/2006 04:13:57
F Bilo
Bilo Office
Fuyang, China
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01125778
Message ID:
01125801
Views:
12
呵呵, fbilo 这个问题你也应该到动感游标上问,我记得有帮国内的李拥军解决过这个问题。

这个问题出在 xmllistener 类上,里面默认的字符集是用 UTF-8 ,而你的报表里带了中文字符,所以,必然出来一个空的 HTML 文件。
解决办法是,修改 listener.vcx --> xmllistener --> applyUserTransformToOutput

修改以下两个地方,
第一个地方,原语句* lcResult = THIS.ApplyXSLT(FILETOSTR(THIS.TargetFileName),THIS.XSLTProcessorUser, THIS.XSLTParameters)
修改为:
lcResult = THIS.ApplyXSLT(STRCONV(FILETOSTR(THIS.TargetFileName),11),THIS.XSLTProcessorUser, THIS.XSLTParameters)

第二个地方,原语句
* STRTOFILE(STRTRAN(lcResult,THIS.SaveTargetFileName)
修改为
STRTOFILE(STRTRAN(lcResult,'charset=UTF-8','charset=gb2312'),THIS.SaveTargetFileName)

然后如果你用的是 reportoutput.app , 那你重新编译一下 reportoutput.app , reportoutput.app 源代码在 Xsource 里有。
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform