Display data in RTF in Crystal Reports - crystal-reports

I have data in my database that is in Rich Text Format. Is there a way to display this type of data in a Crystal Report so that its formatted properly?
BTW, I'm using Crystal Reports 11.5 Release 2

Right click on the field, then select Format Field -> Paragraph tab -> Text Interpretation -> RTF text.
Be aware that RTF doesn't always display like you expect it to. It's a little like how different browsers display the same html/css in various different ways and all have a little quirky behavior... except in my experience... RTF is way more quirky and frustrating.
Good luck.

Related

Can birt support reading html tables from database and displaying them dynamically to a pdf report file?

I have come across a scenario where I have to read html data from database and display it in pdf reports. This html data also contains table structure <table></table> tags and other html element inside it. Previously we used jasper reports for our reporting needs but recently as we came to know that the above functionality is not supported in jasper, I wanted to know which reporting tool can be used so that it can be incorporated with servoy. Does birt provide this functionality?
AFAIK none of the well-known reporting tools does support this, although in BIRT it works "somehow" - but not good enough to be usable.
The reason for this is simple, I think: A reporting tool would have to incorporate a complete browser engine like WebKit or others to achieve this, because it would have to "understand" the structure for its page-breaking algorithm.
Yes, BIRT has a text element where we can set the display type to HTML. If the html table is in a dataset field you will just have to include it in the expression of the text using "value-of" tag, something like this:
<VALUE-OF format="HTML">row["htmlTableField"]</VALUE-OF>
PDF format is taking such html elements into account, including most of simple style settings such background color, text-align, borders etc.
Usually the reports render just fine with html.
There are some tricks to displaying html correctly in BIRT.
You may use a Dynamic Text element and set to html or auto.
Here are some tricks to handling free form text..
Make sure your xml is valid, I recommend replacing line breaks or you may catch a scenario where the rptdocument will not export.
Also, if possible keep these in auto layout, when using run + render. The page breaks may actually be calculated once on run and again on render. You might experience breaking issues with fixed. The page may attempt to display all the html prior to breaking a page when using the RUN() phase, in web viewer or the rptdocument. Then when rendering to pdf the the breaks are applied differently, with fixed layout.

Excel rendered from SSRS loses currency symbold when viewed on iPhone in UK

Our reports format the currency dynamically. So in the result-set there is a column called CurrencyFormatString. This is applied to the appropriate fields via FORMAT(FieldName,CurrencyFormatString)
Everything seems to work fine until the report is rendered to Excel and the file is viewed on an iPhone. For our UK Customers they see $ instead £ for the currency symbol. Of course, it works just fine on an Andriod device.
If I take the correct formatting mask, and manually put it into an Excel cell. Save it and send to myself it works fine. There seems to be something going on with the Currency setting on the cell overriding the format.
This comes out in the Column CurrencyFormatString: £#,##0.00;(£#,##0.00)
Export to Excel, open and R-Click Properties you see: [$-10409]£#,##0.00;-£#,##0.00
when SSRS renders the Excel. I don't know what that first part in brackets is, Im guessing it has something to do with the Currency setting which is set to $.
Any ideas on getting the proper format to propagate to the iPhone? This is using SSRS 2008. I havent tried on newer versions of SSRS.
You can trick Excel by exporting an excel formula.
In the SSRS report, if you use something like this sort of formula:
"=TEXT(" + FieldName + ",""£#,##;-£#,##"")"
On the report it will look like this if you view it in html renderer:
=TEXT(55.00,"£#,##;-£#,##")
When exported to excel, the excel formula parser will kick in and you will get
£55.00
Ugly workaround I know. -1 to iPhone's Excel app.
The answer to this question appears to be, you can't.
It also appears that the SSRS included with SQL Server 2012 now defaults to rendering in .xslx which the native iPhone Email app can't open anyways.
If you, your company or customers use Android, you should be fine.

Crystal report to pdf's not generating as seen in Preview of Crystal Reports

I am generating a crystal report and using a C# prog to break or "burst" the file in to individual pdf's (using this prog.... Crystal Reports "File Break" )
When move the PageHeader section to the "Report Head" section, the details part of crystal reports does not show after the C# prog generates.
When I preview the crystal report from "preview" in crystal reports the detail section is there.....
Any Ideas?
Thanks in advance!!
I would post images but the site will not let me with out more than 10 rep points..
This is the crystal report preview
And this is after i generated the pdf.... See how the details section is not being populated, even tho in the preview in CR the activities are showing.... This all happened when i switched the top image to be in the group head instead of the page head....
Assuming there is nothing going on programmatically with hiding/suppressing sections, record selection, etc... generally, if a preview looks different than what is output to PDF or printed, it's always related to printer drivers, fonts chosen, and report printer setup.
For starters, I would make sure you're using a common "HP-compatible" printer as the driver (selected default printer while developing in Crystal) for the report. Also, just for testing purposes, change your report fonts to something VERY simple and "old school" like Courier or Arial. If you get the correct results after this, then go in and tweak/reapply your old fonts.
Also, make sure your individual field objects on the form are set to Can Grow. Additionally, always size your objects bigger than what it looks like it needs. For example, if a field looks like it needs to be 10 characters wide, size it 12 characters wide. This will help with printer and output incompatibilities.

smart way to design crystal report

I want to create a crystal report that will match a pdf file. The info in the pdf file is a combination of form fields and instructions layed out in a table format. The crystal report should exactly match the pdf file because I will export the report to pdf later.
is there a smart way of quickly designing the rpt file? like converting the pdf file to an rpt file?
You're better off just building the rpt file from the ground up -- there are no utilities I'm aware of that can covert the PDF to a RPT file.
I agree with LittleBobbyTables in that I don't know of a pdf to Crystal Reports converter so you'll have to build the report on your own from scratch, but you may look into other options instead of Crystal Reports if possible.
Of course it's hard for me to give a good solution since I don't know the drivers behind the decision to use Crystal Reports, but if you are looking to display the data in a web page, Adobe has a pdf to HTML converter here that you may be able to start off with. You put the url to the pdf form and it converts it to HTML or Text. I tried it and thought it did work, it wasn't really close in the look and feel of the original pdf form so you can use it to get you part of the way and then you can wire up the data portion to display your data. Just throwing out another option instead of wedding yourself to Crystal Reports. Hope it helps.

How can I display Arabic data in Crystal Reports?

I am using Crystal Reports 10. The reports are obtaining data from an Oracle 10G database. We have some data in Arabic. When I try to display the Arabic data it is showing as ?.
Any ideas on what I can do to display this correctly?
I've never used crystal reports and my oracle knowledge is limited, however I've done some work in Arabic. Things to look out for.
Does the Database have the arabic locale installed can it display right to left text.
Under windows check the languages settings and check that the option to include support for left to right writing systems is installed.
Check that your database is the international version and not one that only supports the latin character set. It may be that there is a problem converting between ASCII and Unicode.
Arabic Characters are not on the same ASCII code page as the Latin Character set your machine will be used to using, there might be a special version of crystal reports that supports arabic.
Check that the machine you are running crystal reports on has the arabic locale/fonts installed on it.
UPDATE
I've Had a quick look on the internet and you might want to look at this link
Here is a summary:
This issue can be solved when you
create the reports without needing to
write any extra code. I haven't tested
this solution because I don't have any
data to test it against.
First you want to make sure that you
are using a UNICODE font which I'm
sure you are probably already doing.
Then to configure the "Right to Left"
you can right click on any field and
select "Format Text" or "Format
Field". You should see a "Paragraph"
tab. In there you can set the content
to be "Left to Right" or "Right to
Left". The button on the right allows
you to make this setting conditional
on a parameter value or something like
that. I hope this helps.
Right Click on field > Format Object > Paragraph then Reading Order Right to left
Make sure you have Arabic support installed in Windows.
Add the correct LANG and NLS_LANG to your registry (for me it's ARABIC__QATAR.AR8MSWIN1256)
right click on your data base and select properties
then select options then change collation to Arabic_CI_AS