Html problem

edited 12:23PM in FastReport VCL 5
Hi all;
We have some html texts like below
<div>
<div style="text-align: justify; line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: " lang="LT" arial?,?sans-serif?;="" font-size:="" 8pt?="">REGISTRUOKITĖS </span>[/b]<span style="font-family: " lang="LT" arial?,?sans-serif?;="" font-size:="" 8pt?="">skryd??iui iš Vilniaus internetu: www.dddd.lt.</span></div>
</div>
we put that text in memoview and enable "AllowHtmlTags". But it is not allow html tags we see text like above. What we have to?
Best regards.
ps: Pls dont advise rich text.

Comments

  • edited 12:23PM
    ismet wrote: »
    Hi all;
    We have some html texts like below
    <div>
    <div style="text-align: justify; line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: " lang="LT" arial?,?sans-serif?;="" font-size:="" 8pt?="">REGISTRUOKITĖS </span>[/b]<span style="font-family: " lang="LT" arial?,?sans-serif?;="" font-size:="" 8pt?="">skryd??iui iš Vilniaus internetu: www.dddd.lt.</span></div>
    </div>
    we put that text in memoview and enable "AllowHtmlTags". But it is not allow html tags we see text like above. What we have to?
    Best regards.
    ps: Pls dont advise rich text.


    The documentation states you can't set the actual font or size with HTML tags. It is limited but you could use tags like bold, italics, super and subscript. What I usually do is set it in code what I would want it to be and don't use HTML.

    Creating a class that handles the report can be a good idea depending on what you are using it for. Below is a snippet on how I set in delphi.

    //Fmemo is a TfrxMemoView and FReport is a TfrxReport
    Fmemo := FReport.FindObject(MemoName) as TfrxMemoView;
    if assigned(Fmemo) then
    FMemo.Font.Name := FontName; //FontName is a TFontName

    Fmemo := FReport.FindObject(MemoName) as TfrxMemoView;
    if assigned(Fmemo) then
    FMemo.Font.Size := fontSize; //font size is an integer

    Hope this helps!
  • edited 12:23PM
    tnks for answer.I will do it as u say. And i see fast report dont think to support all html tags. Have u got any plan about that? tnks.
    thomasb wrote: »
    thomasb wrote: »
    Hi all;
    We have some html texts like below
    <div>
    <div style="text-align: justify; line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="font-family: " lang="LT" arial?,?sans-serif?;="" font-size:="" 8pt?="">REGISTRUOKITĖS </span>[/b]<span style="font-family: " lang="LT" arial?,?sans-serif?;="" font-size:="" 8pt?="">skryd??iui iš Vilniaus internetu: www.dddd.lt.</span></div>
    </div>
    we put that text in memoview and enable "AllowHtmlTags". But it is not allow html tags we see text like above. What we have to?
    Best regards.
    ps: Pls dont advise rich text.


    The documentation states you can't set the actual font or size with HTML tags. It is limited but you could use tags like bold, italics, super and subscript. What I usually do is set it in code what I would want it to be and don't use HTML.

    Creating a class that handles the report can be a good idea depending on what you are using it for. Below is a snippet on how I set in delphi.

    //Fmemo is a TfrxMemoView and FReport is a TfrxReport
    Fmemo := FReport.FindObject(MemoName) as TfrxMemoView;
    if assigned(Fmemo) then
    FMemo.Font.Name := FontName; //FontName is a TFontName

    Fmemo := FReport.FindObject(MemoName) as TfrxMemoView;
    if assigned(Fmemo) then
    FMemo.Font.Size := fontSize; //font size is an integer

    Hope this helps!

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.