Page 1 of 1

StiGlobalizationItem

Posted: Thu Feb 09, 2012 10:44 am
by Andreas Tastler
Hi

I read GlobalizationItems from a report with the follwoing method.

Code: Select all

private List GetGlobalizationItems(StiReport report)
    {
      List globalizationItems = new List();
      StiGlobalizationContainer container = new StiGlobalizationContainer(Sprache);
      report.GlobalizationStrings.Add(container);
      container.FillItemsFromReport(report);
      foreach (StiGlobalizationItem item in container.Items)
      {
        if (!string.IsNullOrEmpty(item.Text)) globalizationItems.Add(item);
      }
      return globalizationItems;
    }
For richtext elements the Text will be escaped.
__LP___x005C_rtf1_x005C_ansi_x005C_ansicpg1252_x005C_deff0_x005C_deflang2055__LP___x005C_fonttbl__
LP___x005C_f0_x005C_fnil_x005C_fcharset0_x0020_Arial_x003B___RP____
LP___x005C_f1_x005C_fswiss_x005C_fprq2_x005C_fcharset0_x0020_Arial_x003B___
RP____RP___x000D__x000A__x005C_viewkind4_x005C_uc1_x005C_pard_x005C_qj_x005C_fs20_
x0020_Das_x0020_aktuelle_x0020_Verzeichnis_x0020_von_x0020_kontrollberechtigten_x0020_Fi
rmen_x0020_kann_x0020_beim_x0020_Eidgen_x005C__x0027_f6ssischen_x0020_Starkstrominspektor
at_x002C__x005C_par_x000D__x000A__x005C_pard_x0020_8320_x0020_Fehraltdorf_x002C__x0020_im_x0
020_Internet_......
Is there any advice to get the clear text from the richtext content?

Thank you
Andreas

StiGlobalizationItem

Posted: Fri Feb 10, 2012 10:11 am
by HighAley
Hello.

Please, try to add StiRichText.UnpackRtf(string) method.

Thank you.