Delphi 2010 - Rave Report runtime text change problem

Hi,

I'm using Delphi 2010 and Rave Reports (comes built in, v. 7.7.0).

I have been using this couple for 5 months without any problem. In my company i have use two languages, first i use our primary language (Turkish) and when people wants to use another language i changed the specific text and memo values according to their tag value.

This approach worked fine till last week. Last week changing the values at runtime stopped work. I don't know why, everything seems ok with the code, i also tried to check changed values, the values seemed to changed but when i execetu reports all the values changed the their defaults.

Here is my code for changing :

{code}
procedure ProcessRaveReport( APageName : string );  // 'rp411.rp411Page'
var
  myPage : TRavePage;
  myText : TRaveText;
  i, iTag : Integer;
begin

  dm.Rave.Open;
  with dm.Rave.ProjMan do
  begin
    myPage := FindRaveComponent(APageName,nil) as TRavePage;
    if myPage = nil then Exit;
    for i:= 0 to myPage.ComponentCount-1 do
    begin
      if myPage.Components[i] is TComponent then
        iTag := (myPage.Components[i] as TComponent).Tag;

      if (iTag > 0) then
      begin        
        if myPage.Components[i] is TRaveText then
        begin
          //ShowMessage((myPage.Components[i] as TRaveText).Text);
          //ShowMessage(getLangIDS((myPage.Components[i] as TRaveText).Tag));
          (myPage.Components[i] as TRaveText).Text := getLangIDS((myPage.Components[i] as TRaveText).Tag);
          //ShowMessage('Sonuc : '+(myPage.Components[i] as TRaveText).Text);
        end
        else if myPage.Components[i] is TRaveMemo then
          (myPage.Components[i] as TRaveMemo).Text := getLangIDS((myPage.Components[i] as TRaveMemo).Tag);
      end;
      //iTag := 0;
    end;
  end;
  dm.Rave.Close;
end;
{code}

You can see my showmessage calls, this messages prove that value changed to new language but at the end i always see the default values.

Is there anyone knows any solution that problem?

Denizhan
0
Utf
9/6/2010 9:34:22 AM
embarcadero.delphi.reporting 487 articles. 0 followers. Follow

1 Replies
1812 Views

Similar Articles

[PageSpeed] 44

Problem solved. Remove the "dm.Rave.Close;" line and it works. With this code i was changing only one instance and close it. After remove the line, the instance i changed become the runtime instance, so my reports changed on the fly at runtime.

Edited by: Denizhan Seçkin on Sep 12, 2010 11:37 PM
0
Utf
9/13/2010 6:37:22 AM
Reply: