RTF formatted text not visible in designer

Originally Posted 8 January 2017, 10:56 pm EST

  • Originally Posted 8 January 2017, 10:56 pm EST

    Why does my RTF formatted text dissapear in the C1Report Designer?

    Sample text - with calculated variable (field property Calculated set to true)
    "{\rtf1 {\fonttbl{\f0 Verdana;}}\fs18 This is \b bold\b0 text followed by todays date " & Date() & "}"

    The resulting report is fine, but the designer cannot display the text.

    Also, why am I required to set the whole {\rtf1 {\fonttbl{\f0 Verdana;}}\fs18 if I have already set the RTF property to true? shouldn't it be enough to set the property to true and let the font be handled by the property grid?


    C1ReportDesigner Application (32 bit mode):
    C1ReportDesigner, Version 4.0.20163.226
    C1.C1Report.4, Version 4.0.20163.226
  • Reply

    Attached zipped sample report
    2017/01/RTFreport.zip
  • Reply

    Hi Sonu,

    Thank you for taking the time to look into the issue :)

    <blockquote><cite>@sonu.pachahara@gmail.com said:</cite>
    Please note, we can not remove any thing from the RTF text string. Because, RTF property just tells to report engine that this is the RTF text or not so that the report engine renders it accordingly.

    Hope, it clarifies.

    Thanks,
    Sonu</blockquote>


    What I meant was, if I set the RTF property in the property grid (calculated to false), it would make sense to me that I didn't have to include the \rtf1 etc. tags in my text aswell. But neglecting to do so it will not treat it as RTF but instead ignore the the \b, \i etc tags

    Sample text;
    \i Italics on \i0 Italics off\line
    \b Bold on \b0 Bold off\line
    \scaps Small Caps On \scaps0 Small Caps Off\line
    \strike Stike through on \strike0 Strike Off\line
    \caps All Capitals On \caps0 All Capitals Off\line
    \outl Outline on \outl0 Outline Off\line
    \ul Underline on \ul0 Underline Off\line
    \uldb Double Underline on \ul0 Double Underline Off\line
    \ulth Thick Underline on \ul0 Thick Underline Off\line
    \ulw Underline words only on \ul0 Underline words only off\line
    \ulwave Wave Underline on \ul0 Wave underline off\line
    \uld Dotted Underline on \ul0 Dotted underline off\line
    \uldash Dash Underline on \ul0 Dash underline off\line
    \uldashd Dot Dash Underline on \ul0 Dot Dash underline off\line
  • Reply

    Hi,
    Please note, this is the design behavior of C1Report/C1FlexReport to remove all the escape sequences (\b,\i,etc) without any effect from the string(without rtf1 tag) if a field's RTF property set to true.

    If you want to print string without removing these escape sequences, please use one of the followings:
    1) Set field's RTF property to false
    2) Use escape sequence with double backslash(\\b,\\i,etc). If RTF property is set to true

    Hope, it clarifies.

    Thanks,
    Sonu
  • Reply

    Hi,
    <blockquote>
    Why does my RTF formatted text dissapear in the C1Report Designer?

    Sample text - with calculated variable (field property Calculated set to true)
    "{\rtf1 {\fonttbl{\f0 Verdana;}}\fs18 This is \b bold\b0 text followed by todays date " & Date() & "}"

    The resulting report is fine, but the designer cannot display the text.
    </blockquote>
    I could also replicate the issue at my end and further escalating this to the concerned team. I will update you along with the progress.



    <blockquote>
    Also, why am I required to set the whole {\rtf1 {\fonttbl{\f0 Verdana;}}\fs18 if I have already set the RTF property to true? shouldn't it be enough to set the property to true and let the font be handled by the property grid?
    </blockquote>
    Please note, we can not remove any thing from the RTF text string. Because, RTF property just tells to report engine that this is the RTF text or not so that the report engine renders it accordingly.

    Hope, it clarifies.

    Thanks,
    Sonu
  • Reply

    Hi Sonu,

    Why my some of formatted text is not retaining in Report.
    Sample text I am trying to display in Report is:
    1. Raj
    2. Sonu
    using below
    <ol>
    • <span style='font-size:15px;font-family:"Calibri",sans-serif;'>Raj</span>
    • <span style='font-size:15px;font-family:"Calibri",sans-serif;'>Sonu</span>
    </ol>

    but its showing as like :
    Raj
    Sonu

    Basically bullets points were not retained in report.


    Regards,
    Abhijit.
  • Reply

    Hi Abhijit,

    For rendering HTML content in a FlexReport, we assume you are using the SuperLabel field. With the following content, we could not replicate the issue.
    Please refer to the sample attached. If you meant something else then please provide us a sample report replicating the issue, so that we can investigate this issue further.


    <ol>
    [li]<span style='font-size:15px;font-family:"Calibri",sans-serif;'>Raj</span>
    [li]<span style='font-size:15px;font-family:"Calibri",sans-serif;'>Sonu</span>
    </ol>


    Regards.
    Avnish
    listReport.zip
  • Reply

    Hi Avinash,

    As I said we are not using FlexReport instead of we are using C1Report to view the report in pdf format.

    Sample Report to be generated in pdf:
    <HTML><HEAD></HEAD><BODY><CENTER><H1>Enhanced Notes </H1></CENTER><BR /><BR /><TABLE><TR><TD><B>Activity Date:</B></TD><TD>05-04-2021</TD><TD ALIGN="RIGHT"><B>Date Created:</B></TD><TD>05-04-2021</TD></TR><TR><TD><B>Entered By:</B></TD><TD>ap1 ap1</TD><TD ALIGN="RIGHT"><B>Note Type:</B></TD><TD>CL Claimant</TD></TR><TR><TD><B>User Type:</B></TD><TD>Billy's Group</TD><TD ALIGN="RIGHT"><B>Subject:</B></TD><TD></TD></TR><TR><TD><B>Note Text:</B></TD><TR></TR></TR></TABLE><div><P><ol><li>Raj</li><li>Man</li></ol><ul><li>David</li><li>Monty</li></ul></P></div></BODY></HTML>


    Regards,
    Abhijit.
  • Reply

    Hi Abhijit,

    We do not see the issue at our end, the lists were shown correctly with the content that you provided. Please refer to the Report and the Pdf generated.
    Please provide a sample report replicating the issue so that we can investigate this issue further.

    Regards.
    Avnish

    C1Exports.zip

    PS:
    Please note that C1Reports is in maintenance mode and will not receive any new features or updates. We recommend you upgrade to FlexReport which offers an improved experience and regular updates with fixes and new features.
    For more info please visit:
    FlexReport https://www.grapecity.com/componentone/flexreport-net-reporting-engine

    FlexReport versus C1Report https://www.grapecity.com/componentone/docs/win/online-flexreport/FlexReportversusC1Report.html

    Upgrading C1Report to FlexReport https://www.grapecity.com/componentone/docs/win/online-flexreport/UpgradingC1ReporttoC1FlexReport.html
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels