cancel
Showing results for 
Search instead for 
Did you mean: 

Can Crystal Reports print RTF accurately?

trav1
Explorer
0 Kudos

I've been using Crystal Reports SDK for many (many!) years. In the past, we tried to print RTF and it wasn't working correctly (note that I am talking about including RTF formatting in the report, NOT exporting). I can't recall the exact issue now. Has that been resolved? Can CR render RTF correctly now?

Are there limitations or compatibility issues?

Is there a better format to use, e.g., ODT (open document), or something else?

Any links to documentation or examples on how to do this would be appreciated (or just explain here).

We are using the latest Microsoft Visual Studio Community 2022 (64-bit) and Crystal Reports for .NET Framework. Our goal is to have the user able to enter rich text in a Windows app RichTextBox and then have that printed to the report. The report is very large, with about 60 subreports.

Thanks!

DellSC
Active Contributor
0 Kudos

I updated the tags on your question to just the two that are applicable:

SAP Crystal Reports, version for Visual Studio is the correct tag for questions about using the .NET SDK.

SAP Crystal Reports is the correct tag for questions about report design or for questions about using the Crystal Reports desktop software.

-Dell

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Crystal Reports RTF text interpretation was introduced to format text with basic RTF tags. It does not support the full set of RTF tags, as it is meant to only support the formatting that can be done in Crystal Reports for a text object like: fonts, font size, font colors, bold, italic.


Regards,
J Wick

Answers (4)

Answers (4)

0 Kudos

HI TEd,

Why export to RTF when CR can export to PDF?

Have you tested that since you are appending PDF to PDF anyways?

FYI - RTF and DOC is the same file internally.

Don

trav1
Explorer
0 Kudos

Hi Don,
That's what we are doing -- exporting to PDF. My question was whether there was a way to incorporate RTF (or DOC or HTML or any rich text) into the Crystal Report. Currently the user is entering info into Word docs and we are converting that to PDF and appending that PDF to the Crystal Report PDF. If we could capture that rich text in the program and print it in the Crystal report rather than using the Word shenanigans (converting/appending) above it would be more efficient and a more integrated experience for the customer.

-Ted

ido_millet
Active Contributor
0 Kudos

That's the type of merging I was describing.
Perhaps you can also avoid the need for manual editing.

ido_millet
Active Contributor
0 Kudos

In that case, afaik, the only solution would be to deliver the output as a PDF after merging content from the report with the RTF data. Or some variation on that theme.
Possible but not easy.

trav1
Explorer
0 Kudos

Thanks for your help, I appreciate it. Yes, we are only interested in the PDF output for this application.

What I'm doing currently is converting Word docs (not RTF) to PDF and then using a 3rd party app to append that into the CR PDF report, so it appears to the user as one PDF. That involves two extra steps (conversion and appending) but appears to be the only way. Also it requires the user to edit the rich text outside my app.

Could you clarify "merging content from the report with the RTF data"? Is there a better way than I described above?

ido_millet
Active Contributor
0 Kudos

afaik, Crystal still doesn't support all RTF tags. But there's a way around that limitation.
Will the RTF content always fit within 1 page?

If so, I'd like to test a solution.
Please upload an rpt with saved data (including the database field containing the RTF content).

ido_millet
Active Contributor
0 Kudos

Forgot to ask: are you free to store the content as HTML?
If so, there's already a solution to overcome limitations for that format.

trav1
Explorer
0 Kudos

Thanks for the reply.

The RTF data will not necessarily fit on one page. Since there are so many subreports the RTF sections may start mid-page and go on for any number of pages.

I haven't tried to create data yet for testing, thought I would float it here first.

trav1
Explorer
0 Kudos

Re: "are you free to store the content as HTML?", I hadn't thought of that. I'd have to get a 3rd party editor for the user to do bolding, tables, etc. That might be a possibility. What is the solution to print HTML?

ido_millet
Active Contributor
0 Kudos

I was not asking if ALL the RTF instances throughout the report fit in 1 page.
Instead, I was asking if the RTF in EACH INSTANCE of RTF content fits into no more than 1 page.

trav1
Explorer
0 Kudos

No, each instance could be very long -- possibly dozens of pages.