0
votes

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 use two languages, first i use our primary language (Turkish) and when people wants to use another language i change 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 working. 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 execute reports all the values changed the their defaults.

Here is my code for changing :

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;

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

1

1 Answers

0
votes

I miss the .execute of the RvProject-component "Rave" ... on a quick check it looks good but you only change the instance of the RvProject and not the file itself.