2012-02-22

FoxyPreviewer – HTML like formatting!

FoxyPreviewer brings another cool facility, that allows you to draw your texts in the report surface (and export it) having control on each word. Forget those old workarounds, generating images to draw some texts in your reports or even embedding RTF controls in your reports !

This brings a super cool new feature, allowing you to add some basic HTML texts to your fields. This means that you can from now on determine how EACH WORD in your field should be formatted!
See the image below, all the text is in ONE SINGLE FIELD !


How to do it ?
Very very simple:
  1. Open your report, in Edit mode
  2. Double-click the field that you want to add the tagged formatting. This will open the field properties dialog
  3. Click on the "Other" tab
  4. Click on the "Edit user data..." button
  5. Add the string "<TF>" as shown in the picture below:


And just add the HTML code below to that field:


The search capabilities are kept, and exporting to PDF returns an excellent output as well.
Here is the list of the available TAGS that you can use:

Feature Opening Tag Closing Tag
bold <b> </b>
italic <i> </i>
underline <u> </u>
strikethru <s> </s>
text color <color=rgb/ncolor >
<c= >
</color>
</c>
text backcolor <highlight=rgb/ncolor>
<h=rgb/ncolor>
<backcolor=rgb/ncolor>
</highlight>
</h>
</backcolor>    && in FP v3
font name <fontname=”name”>
<fname=”name”>
</fontname>
</fname>
font size <fontsize=n>
<fsize=n>
</fontsize>
</fsize>
whole font style <fontstyle=”BIUS”>
<fstyle=”BIUS”>
</fontstyle>
</fstyle>
force new line (CRLF) <br>
CHR(13)
CHR(10)
CHR(13) + CHR(10)
NB: color could be stored a number with RGB()
NB: could prevent transform if '</' not in string



Special thanks to Eduard Alexandru, from Bucarest, Romania, for his essential help in this feature, help in discussions and for providing some procedures to deal with the tagged texts.
This feature still needs some tests. It is possible that you find some tags that are not being considered, please me!
Check the sample SAMPLE_TF.FRX in the latest FoxyPreviewer release to play with the new features.

13 comments:

  1. Do not get tired of saying: Thanks Cesar

    ReplyDelete
  2. Cesar!
    This is indeed a very cool feature. Thanks for sharing.
    Koen

    ReplyDelete
  3. Thanks Cesar, It would be nice if you can add a click to open new report/form functionality in foxypreviewer reports.

    ReplyDelete
  4. Thanks Zaheer,
    But this will not be possible, since VFP does not allow one report to open another.

    ReplyDelete
  5. Thanks Koen !
    Your support, evaluations and help are always very welcome!

    ReplyDelete
  6. Amazing Cesar thanks!

    ReplyDelete
  7. Hi,

    Very exciting development ! There is a problem when a report is running without the preview argument, like:

    REPORT FORM Myreport NEXT 1 TO PRINTER

    No problem with PREVIEW

    Thank's very much

    ReplyDelete
  8. Hi Vincent.
    You only said "There is a problem"...
    But what problem? Please provide as much details as you can, so that I can understand what is going wrong, what feature has probles at your side.

    ReplyDelete
  9. I am testing it, but When I export/ save with foxyPreviewer the fields don´t appear at excel files, and no color or anything for the objects: example:
    add to report a field with this
    [TradeTerms]+[-my terms-]

    Preview report: I got 2 colors. purple and black.
    Save as XLS: I got a empty excel with nothing where the report field is.

    IF I put colors for the label via ¨style¨ tab in properties of field, in preview I got the colors, but in export XLS font is always black

    ReplyDelete
  10. When I export the report to PDF I only getting some format where no report data on it. This is occurs when a executable file is run in a different computer (Not the computer where the report is design)

    ReplyDelete
  11. Thanks for reporting!
    This issue was solved in v2.99

    ReplyDelete
  12. excellent work here....well done.

    Do the HTML Tags support superscript and subscript tags i.e. HTML and Tags ?

    ReplyDelete
  13. Hi, has anyone been able to combine this function with the full justified field? When I test it, Foxy only does the formatting text, but not the justification.

    ReplyDelete