cancel
Showing results for 
Search instead for 
Did you mean: 

AJAX HTMLEditor, Crystal report and HTML support

Former Member
0 Kudos

I am using AJAX HtmlEditor Control as a rich text editor in my application. The control in ASP.NET Page displays the text, stores correctly on the database and can retrieve the text and display it correctly.

I am using native Crystal Reports to create a report using the data that was saved into the database by the AJAX HTMLEditor control. The paragraph formatting option in the report is set to HTML. However any infomation and tags with in

<span>

are lost. I also tried setting the formatting option to RTF but had the same problem.

For example:

I typed the following information into the control:

This is normal text.

This is normal but red text

This is how the control saves the data in the database (SQL Server 2005):

This is normal text.<br />  <span style="font-size: 18pt">This is normal but red text.</span>

This is what is printed in the Crystal Report:

This is normal text.

Whatever is in the

<span>

tag is totally ignored.

I will appreciate any help with this !!

Edited by: Skvskv on Oct 30, 2009 10:44 PM

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Assuming you are using CR 2008, see if the following steps will help;

1) Open your app web.config

2) **** Make a back up (copy) of the above file ***

3) change the web.config file so that it looks like the "AFTER" section below

BEFORE

<configSections>

<section name="CrystalReports" type="System.Configuration.NameValueFileSectionHandler,System,Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

</configSections>

<CrystalReports>

<add key="path.dhtmlViewer" value="/crystalreportviewers12" />

</CrystalReports>

AFTER

<configSections>

<section name="CrystalReports" type="System.Configuration.NameValueFileSectionHandler,System,Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

<sectionGroup name="businessObjects">

<sectionGroup name="crystalReports">

<section name="crystalReportViewer" type="System.Configuration.NameValueFileSectionHandler,System,Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

</section>

</sectionGroup>

</sectionGroup>

</configSections>

<CrystalReports>

<add key="path.dhtmlViewer" value="/crystalreportviewers12" />

</CrystalReports>

<businessObjects>

<crystalReports>

<crystalReportViewer>

<add key="EncodeHtmlForSingleLineFieldObjects" value="false"/>

</crystalReportViewer>

</crystalReports>

</businessObjects>

4) save the web.config file and test a report which contains HTML...e.g. a report with a formula like '<html> </html>'

Ludek

Edited by: Ludek Uher on Nov 3, 2009 12:08 PM

Answers (0)