Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Strange character shown in DBCheckBox for Delphi 2007 application running in Chinese PRC locale

edited November 2012 in General
Hi,

This issue should be related to:

"Strange character shown in DBCheckBox for Delphi XE2 application
running in Chinese PRC locale".

I am using ReportBuilder 14.07 in Delphi 2007 where Chinese PRC is the
system locale for non unicode application. When I print a report with
TmyDBCheckBox control, the check box always shows empty character. I
recompile my application with ReportBuilder 12.03 and the problem
doesn't happen.

After I trace project with ReportBuilder 14.07, I found out
ReportBuilder 14.07 invoke a method in unit Classes:

function IsDefaultStrProp: Boolean;
var
Value: WideString;
begin
Value := GetWideStrProp(Instance, PropInfo);
if AncestorValid then
Result := Value = GetWideStrProp(Ancestor, PropInfo)
else
Result := Value = '';
end;

In localed environment (e.g.: Chinese PRC), this line

Value := GetWideStrProp(Instance, PropInfo);

return "?" is Value as the Delphi 2007 string is AnsiString.

Here is the stack trace that cause problem:

Classes.IsDefaultStrProp
Classes.IsDefaultPropertyValue($365D20,$57DB1F,(Classes.TWriter.GetLookupInfo,$2BAE30),$2BAE30,(nil,nil))
Classes.TWriter.WriteProperty($365D20,$57DB1F)
Classes.TWriter.WriteProperties($365D20)
Classes.TWriter.WriteData($365D20)
Classes.TComponent.WriteState(???)
Classes.TWriter.WriteComponent($365D20)
ppRelatv.TppRelative.GetChildren((Classes.TWriter.WriteComponent,$2BAE30),$325560)
Classes.TWriter.WriteData($325560)
Classes.TComponent.WriteState(???)
Classes.TWriter.WriteComponent($325560)
Classes.TWriter.WriteDescendent(???,???)
Classes.TStream.WriteDescendent($325560,nil)
Classes.TStream.WriteComponent(???)
ppPageCacheFile.TppPageCacheFile.WritePage($325560)
ppPageCacheFile.TppPageCacheFile.AddPage($325560)
ppThreadedPageCache.TppThreadedPageCache.ehPageRequestThread_ReceivePage($2E4B10,$325560)
ppThreadedPageCache.TppPageRequestThread.ehSynchronizedPageReceive
Classes.CheckSynchronize(???)
Forms.TApplication.WndProc((0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
Classes.StdWndProc(985854,0,0,0)
:770462fa ; C:\Windows\syswow64\USER32.dll
:77046d3a USER32.GetThreadDesktop + 0xd7
:770477c4 ; C:\Windows\syswow64\USER32.dll
:77047bca USER32.DispatchMessageA + 0xf
Forms.TApplication.ProcessMessage(???)

The problem doesn't happen in ReportBuilder 12.03 as it doesn't support
TppPageCacheFile.

--
Best regards,
Chau Chee Yang

Comments

  • edited November 2012
    Hi Chau Chee Yang,

    We are researching this issue. ReportBuilder 14 relies on the Delphi
    object streaming architecture to cache and load pages to be displayed in
    the previewer. In my testing, the issue does not occur for Delphi 7,
    Delphi 2009 or later with the Chinese PRC locale.

    You can set the PreviewFormSettings.SinglePageOnly property to True to
    work around the problem currently.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.