Crystal Reports 11 - Remove HTML format on a Memo field - crystal-reports-xi

Using Crystal Reports 11, I want to report on the number of characters within a memo field. The problem is that it is feeding through HTML from the System.
I want to remove all text that is within "<" and ">" and am having some problems doing this.
I guessed that my best way of doing this was a Replace formula, but it only seems to allow specific characters or group of characters to be replaced. I tried the following:
Replace ({Field_Name},"","")
Basically I want to be able to remove all text within the "<>" symbols to then be able to view the remaining data.
I know that there is an option to format the field with HTML which will then display only the text, but when a count is done on the field, it still includes the HTML text in the character count.
Any help wouldbe great.
Thanks
Dave

After struggling for # a wk. to try to remove HTML from my emails, I decided to go into system restore and went back to a date when I thought this had happened (a wk) and voila - gone! Nada! No HTML! Problem solved so easily.

Related

TCPDF wrong Arabic Character Display with Sakkal Majalla Font

I am using TCPDF for many years. Recently I had to work on Arabic language display. The client wanted SakkalMajalla font (available in Windows/font) and I converted this using TCPDF tool. The conversion process was successful without error.
Now, I am facing a little issue and could not solve it since last 2 months. One of the special characters (called tanween) is placed at the bottom of the preceding character whereas it should be on top.Everything else is working fine but little thing (ٍ
) displayed at wrong place changes the meaning of the word.
يمنع استخدام الهاتف الجوال داخل صالة الاختبار
منعاً باتاً
(I can not upload image as I need 10 reputation points for that, but please notice the little thing on top of this letter تاً. Here, it is displaying properly, but in the pdf it displays at the bottom of the letter.
Is there anyway to edit manually the positioning of this character?
I am searching for the solution for the last 2 months. I event wrote 2 emails to the author of TCPDF Nicolas, but he did not give any response.
Please help.
Even though the font conversion process appeared to work successfully, you should double-check with a font editor (like FontForge) to check that the character is actually encoded correctly in the converted font file.
I have found, after many years of trying to convert all sorts of non-Latin fonts from one format to another, that the most reliable solution for font conversion is this site:
http://www.xml-convert.com/en/convert-tff-font-to-afm-pfa-fpdf-tcpdf

Character encoding issue when extracting data in Keen

What character encoding should I use when addings events to Keen ?
Whenever I use international characters (e.g. ö / ë) , they are stored fine (when I look in the event explorer).
But whenever I use them in reports or the data explorer, they get mangled.
It seems this problem has been fixed over the last couple of days. Awesome!

What options are there for formatting text emails in Rails?

I'm hoping that there are some more options for formatting simple emails formatted as text (not HTML) when using a mailer in a Rails app.
By trial and error, I've found that this markup works in the mailer view (i.e. example_mailer_view.text.erb):
This will be regular text.
==
This text will be formatted in the large, standard HTML Header1 format.
==
The space at the left side of this line will cause it to be smaller text.
>The bracket on the left side of this line will cause it to be indented once.
>>This text is indented twice.
>>This text is indented three times.
_Italicized text_
*This text will be bold.*
Multiple returns...
...between these two lines get compressed into just one blank row.
Is there full documentation of all markup options? Do you know of other markup options that are not listed here? It would be great to have heading2, heading3, etc. Thanks!
Simple text emails are, by definition, simple text. They cannot be formatted. There is no bold simple tyext, nor large simple text, nor italicised simple text. If you see them so, it is because your mail agent is choosing to interpret your plain text emails as if they were written in Markdown; but know that users with other user agents will most likely not see them so. The only way to get rich text emails (i.e. formatted emails) in every email agent (apart from text-only agents such as mutt) is to use an HTML body.

Sanitize pasted text from MS-Word

Here's my wild and whacky psuedo-code. Anyone know how to make this real?
Background:
This dynamic content comes from a ckeditor. And a lot of folks paste Microsoft Word content in it. No worries, if I just call the attribute untouched it loads pretty. But the catch is that I want it to be just 125 characters abbreviated. When I add truncation to it, then all of the Microsoft Word scripts start popping up. Then I added simple_format, and sanitize, and truncate, and even made my controller start spotting out specific variables that MS would make and gsub them out. But there's too many of them, and it seems like an awfully messy way to accomplish this. Thus so! Realizing that by itself, its clean. I thought, why not just slice it. However, the microsoft word text becomes blank but still holds its numbered position in the string. So I came up with this (probably awful) solution below.
It's in three steps.
When the text parses, it doesn't display any of the MSWord junk. But that text still holds a number position in a slice statement. So I want to use a regexp to find the first actual character.
Take that character and find out what its numbered position is in the total string.
Use a slice statement to cut it from.
def about_us_truncated
x = self.about_us.find.first(regExp representing first actual character)
x.charCount = y
self.about_us[y..125]
end
The only other idea i got, is a regex statement that allows it to explicitly slice only actual characters like so :
about_us([a-zA-Z][0..125]) , but that is definately not how it is written.
Here is some sample text of MS Word junk :
&Lt;! [If Gte Mso 9]>&Lt;Xml>&Lt;Br /> &Lt;O:Office Document Settings>&Lt;Br /> &Lt;O:Allow Png/>&Lt;Br /> &Lt;/O:Off...
You haven't provided much information to go off of, but don't be too leery of trying to build this regex on your own before you seek help...
Take your sample text and paste it in Rubular in the test string area and start building your regex. It has a great quick reference at the bottom.
Stumbled across this
http://gist.github.com/139987
it looks like it requires the sanitize gem.
This is technically not a straight answer, but it seems like the best possible one you can find.
In order to prevent MS Word, you should be using CK Editor's built-in MS word sanitizer. This is because writing regex for it can be very complicated and you can very easily break tags in half and destroy your site with it.
What I did as a workaround, is I did a force paste as plain text in the CK Editor.

How does one change the text on the clipboard without altering the format information?

Another clipboard question:
When text is put onto the clipboard, it frequently goes in multiple ways, usually with and without formatting information. What I want to know is this -- how do you change the text on the clipboard without altering the formatting. In other words, I want to change the text side of things, but keep the formatting exactly the same.
This is again for my "TextScrubber" application where I want to remove line breaks from the text on the clipboard, but I don't want to alter the format info about that text.
I'm hoping that I don't have to "brute force" it by iterating over all the formats present, storing each, and then reinserting them after the text has been scrubbed.
I think the "brute force" is precisely what you'll have to do - according to MSDN Win32 API there is no way to do otherwise.
Yep, Nick. I think in this case you're going to be stuck with the solution already suggested. The clipboard is one area that hasn't really gotten much attention in the enhancement department throughout the years. That is probably because it does need to be simple, ubiquitous, and functional.
Why not simply load from the clipboard, change the text, and write back to the clipboard?
Maybe something simple like Sergey Tkachenko's TBin Clipboard: http://delphi32.org/vcl/2889/
Eric Rosenberger's answer to "Can not round trip html format to clipboard" might also be of use.

Resources