i stored html data in to table and while i displaying these records to crystal report is shows a plain text instead of formatted text.. I used ajaxcontroll toolkit to get the html data. my code is like below: <pre lang="HTML"><body> <form id="form1" runat="server"> <div> <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </asp:ToolkitScriptManager> <asp:TextBox runat="server" ID="txt" Height="500px" Width="1000px"></asp:TextBox><br /> <asp:HtmlEditorExtender ID="HtmlEditorExtender1" TargetControlID="txt" ClientIDMode="AutoID" DisplaySourceTab="false" EnableSanitization="false" runat="server"> </asp:HtmlEditorExtender> <br /> <asp:Button runat="server" ID="btn" Text="Submit" OnClick="btn_Click" /><br /> <asp:Label runat="server" ID="lbl"></asp:Label> </div> <br /> <br /> <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true" /> </form> </body>
protected void btn_Click(object sender, EventArgs e) { lbl.Text = txt.Text;//.Content; DataTable dt = new DataTable(); dt.Columns.Add("Data", typeof(string)); dt.Rows.Add(txt.Text); dt.TableName = "DataTable1"; ReportDocument cryRpt = new ReportDocument(); cryRpt.Load(Server.MapPath("~/Report/CrystalReport.rpt")); cryRpt.SetDataSource(dt); CrystalReportViewer1.ReportSource = cryRpt; }
I set the Text Interpretation property to HTML Text of data field in crystal report... But still it displayed plain text.. Thanks in Advance
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)