cancel
Showing results for 
Search instead for 
Did you mean: 

Conversion from FlowDocument?

Former Member
0 Kudos

Our application needs to display text data that is saved in our database as a Flow-document formatted varchar(max).

Does CR have a means of converting the data to HTML or RTF? I'm trying to have to avoid a complete re-write of the report input module

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

In crystal reports having a feature of export the data into HTML or RTF formats.

File -> Export -> Export Report -> select format in dropdown like HTML,RTF -> ok

Thanks,

DJ

Former Member
0 Kudos

Unfortunately, that is not a solution to my problem.

The data is stored with flowdocument formatting in the database. For example, if the user enters "This is a comment" in the text window, it is stored in the database as:

<FlowDocument PagePadding="5,0,5,0" AllowDrop="True" xmlns="http://schemas.microsoft.com/winfx/200/xaml/presentation"> <Paragraph>This is a comment</Paragraph> </FlowDocument>

When this value is retrieved from the database, displaying it on the report using RTF interpretation will display the entire string with all the formatting tags. Displaying the value using HTML interpretation omits the formatting tags, but does not preserve any text formatting (bold, italic, etc) that the user may have entered.

Do I have to write a parser inside the report itself? Is such a thing even possible?

former_member183750
Active Contributor
0 Kudos

Hi Steve

Bad news all around. No parser and no way that I can see of extracting the data in the way you require. In any case, I suspect all of that would take a fair amount of work - even if it was possible. Which brings up a thought; given the work you'd have to do anyhow, how about creating an ADO .NET Dataset off of that FlowDocument and pointing the report at the dataset?

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Former Member
0 Kudos

Bummer.

Unfortunately, making an ADO .NET dataset would be pretty much re-writing the entire report, which is not feasible at this time. Thanks for the response, Ludek.

former_member183750
Active Contributor
0 Kudos

Yeah - I figured as much. But it was an idea worth throwing on the table

- Ludek

Answers (0)