I am trying to make part of array text into superscript inside my formula field. I tried rendering the field as HTML with a tag but it seems it is not supported. Following did not work
numberVar array arr:=["1<sup>st</sup>"];
Is there a way round this problem ?
It turns out Crystal Reports works with superscript, only the same way as Visual Studio does. Just copy/paste one of these: ¹²³⁴⁵⁶⁷⁸⁹⁰
As far as I'm aware, Crystal Reports doesn't support superscript at all, not for HTML (see here for supported tags if interested), or for RTF.
Off the top of my head, you would need two separate textboxes to achieve this effect, with the "st" text at a higher Y-position than the "1" to get "1st".
Related
I have a field that I'm displaying on a report that is a combination of text and codes that represent an image. Some of those icons have ascii symbols that I've used a replace formula to display them as their ascii version. For two or three of the images, I have no luck and have to display a mini picture for the representation.
The codes being sent are something like:
^he^ = ♥ ^st^ = ⭐ ^cl^ = 🍀 etc...
So for the clover leaf, there is no emoji support in my version of Crystal for clover leaves, and the ascii icon I found online for it just shows the empty square icon when an emoji isn't supported.
My workaround for this is to have a formula that converts all my icons to the appropriate ascii where supported, and to leave two blank spaces for the unsupported icons.
>stringvar gift_msg;
>gift_msg:= {DataTable1.gift_field};
>gift_msg := replace(gift_msg,"^CL^"," ");
>gift_msg := replace(gift_msg,"^HE^","♥");
>gift_msg := replace(gift_msg,"^ST^","★");
>gift_msg
I then put a suppression formula on each image that looks like this:
>mid({DataTable1.gift_field},2,4)<>"^CL^"
So I duplicated the image along the length of the field and increment the mid formula to match the field. I also set the font to Consolas so that it's fixed width to remove any surprises in spacing. My issue is that this still creates very strange spacing, and I'm almost certain there's a much easier way to do this.
One option is to use a free service such as Calligraphr.com to convert your image to a font.
Given that your image relies on several colors, the font option might not work.
Another option is to build the expression as html with image source directives where you need them. You would then need a create or use a 3rd-party UFL to convert the full expression to an image that you can load on the fly using the Graphic Location expression. At least one of the UFLs listed by Ken Hamady here provides such a function.
I used chr(252) for tick mark in crystal report, this tick mark displayed in chrome, IE Except Firefox.. Firefox won't support windings font, so i have to used unicode..
These are the unicode for tick mark (U+2713 Hex) and (10003D), Now, by which method or way or technique i can use these unicode??
Please, reply me asap...
I didn't get any method to use unicode as a parameter.. but i got my solution...
In crystal report formula, i used html tag( <font> ✓ </font> ) and set to this field into HTML Text by Format Object option..
Now, its work....
In Crystal Reports 2008, I need to have an accurate count of all of the lines that have been displayed in a sub report.
I'm using a shared variable and incrementing as needed when lines display. The only problem I'm having now is when a field wraps. We are not using a fixed width font, so going by field length does not solve the issue, as 'i' is not as wide as 'w' and so on.
Is there a way to find out if the data in a field will be wrapped, and if so how many lines it wraps to, or is there a way to find out what the height of the section that the field is in (or the field itself) has grown too?
Or, is there an even better way to count how many lines have actually displayed on the sub report?
No, there is no way to do what you describe.
If you used a fixed-width font, you could then do some math based based on "it wraps at X characters" do if length of string is 100, then it went 2 lines, etc.
I have a question to iReport/JasperReports experts.
I just started to learn JasperReports and iReport.
It looks promising, when you want to print some table reports based on some datasource.
But I have little different requirement.
I have templates prepared in Microsoft Word (typical agreement printout).
Mostly static text with lots of formating like:
lists,
enumerations,
bolding,
italic,
different size fonts,
margins,
indentions,
alignments
and so on
with very few dynamic fields to fill like name, surname, identity number, ...
I can`t find easy way to implement such rich text editor templates in iReport.
Is it possible?
Is it managable?
Is iReport/JasperReports suitable for such rich text editor like printouts?
Thanks
iReport really just defines the template and formatting of the data printed in the report, so you can use it to set font sizes, styles, margins, indentations, etc. If you're using things like a bulleted list or a numbered list, you may have to improvise some using subreports, but for the most part this type of setup is exactly what iReport does.
I have a column of RTF data that looks like the following:
The terms or definitions to be used in this document are:
Daily Operator. Used when the user is.......etc..
Using crystal reports I would like to grab just the BOLD text using a formula or equivalent.
I keep getting the RTF markup instead of standard text. Here is an example that I used to grab first 10 characters.
DIM convertedText as String
convertedText = cstr({table.DefinitionRTF})
FORMULA = MID(convertedText, 1, 10).
Looking ahead a bit more, how would one determine where the bold or italic Starts. Can you check for crBOLD and return the characters index position?
Thanking all in advance.
No, Crystal does not have the built-in commands to parse RTF objects by font properties. The purpose of Crystal Reports is to present formatted reports (and it more or less does this job very well). Sorry, but it's definitely not made to be a RTF parser.
I recommend doing this with some other tool, for example, a VBA script in MS Access that imports the RTF and parses it using the MS Word API. Probably wouldn't be that difficult.