Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Rtf and HTML not interpreted properly Post Reply Post New Topic
Author Message
jbalat
Newbie
Newbie


Joined: 23 Jul 2013
Location: Australia
Online Status: Offline
Posts: 2
Quote jbalat Replybullet Topic: Rtf and HTML not interpreted properly
     Posted: 24 Jul 2013 at 10:08am
I create the rtf in an rtf text box on my vb form. Some users like to cut and paste stuff out of Word. It all looks great in the rtf box. However when previewed in Crystal font strikeouts will often start ok but then will not terminate properly so striking out the entire document. !

Im using 8.5 but after some searching it looks like the problem has never been fixed by SAP.

BLOB
The other option I tried was to capture the rtf file into an ole field on my vb form then get it into the database as a blob field and let crystal display it as a "dumb" picture.
The issue with strikethrough there is due to vertical scaling of the image since the image is very lo-res and will sometimes print with a strikethrough missing just like when you used to scale an image in the old paint program and lose detail.
The image size is also limited to the vertical resolution of your monitor even if you paste the ole control into an infinitely sized picture box. This has the effect of only printing up to a maximum of 1.8 pages worth of the report in crystal.

Anyway any clever ideas to display my report properly.. Im even considering pasting data into a HTML template and then displaying it in a web browser. I'm desperate
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 25 Jul 2013 at 4:58am
Nothing clever, and no solution really either.

The problem with the Crystal textbox is while you can change the font and the strike through on text at design time to do anything you want, programatically it doesn't allow the same level of control (as you well know)

You might be able to add text boxes dynamically at run time to contain each segment of text that is either struck out or not, but I am not sure exactly how that would work with growing and wrapping...

I'm not sure how well that would work just from inside of CR.

And CR doesn't handle images well either, as there is no ability to resize an image from inside of CR.

Maybe someone else has a trick, but mixed font type of dynamic sizing have not worked for me for the above reasons.

I haven't tried to manipulate the report from an app other than to set parameters.

Depending on the number of sections that would be struck out and not, you might be able to build enough textboxes and conditional display logic to try playing with this in CR, but it's new ground for me.

Good luck
IP IP Logged
jbalat
Newbie
Newbie


Joined: 23 Jul 2013
Location: Australia
Online Status: Offline
Posts: 2
Quote jbalat Replybullet Posted: 04 Aug 2013 at 12:42pm
Thats ok, I have gone back to the BLOB method.
 
I was able to squeeze a little more content by adding some rtf code to change the page size which is limited to about 20,000 twips.
 
\paperw11907\paperh20000\margl1021\margr567\margt567\margb567
 
 At least I discovered that the ole itself was not limited to the vertical res of the monitor but rather the blob field in crystal reports is limited to displaying only 1 page of information. This translates to approximately 1.8 pages in my report because of headers and different sections. Unfortunately if the content is longer than this then it just gets cropped.
 
I had to add some code to kill a blank word document that would spawn every time I assigned the rtf file to my ole control which then populated a blob field in my access database.
 
One day someone will create a Reporting tool that works properly :(
 
 


Edited by jbalat - 04 Aug 2013 at 12:52pm
IP IP Logged
ejanakieff
Newbie
Newbie


Joined: 02 Oct 2013
Online Status: Offline
Posts: 1
Quote ejanakieff Replybullet Posted: 06 Oct 2013 at 11:34pm

We are using Crystal Reports 8.5 for VB 6.0 and Crystal Reports 10 for Visual Studio 2008.
Recently I included a Rich Text Box control in my visual basic 6.0 application, because I want to save text in RTF.
Then I wanted to show this Rich Text into a Crystal Report 8.5 and in a Crystal Report 10.

The text ever shows ok in the Crystal Report 10.

But in the crystal reports 8.5 the accented vowels are not showed correctly.
This only occurs if we paste text to the rich text box from a WORD document.

Sample of rtf content that makes this error only in Crystal Report 8.5:

{\rtf1\ansi\ansicpg1252\deff0\deflang3082{\fonttbl{\f0\froman\fprq2\fcharset0 Arial;}{\f1\fnil\fcharset0 Arial;}}

\viewkind4\uc1\pard\f0\fs20 Prova nova esmena amb accents:

\par \'e1, \'e8, \'e9, \'f2, \'f3

\par \f1\fs20

\par }

Can you help me?

Thanks,

Eva Janakieff

IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum