如何从 crystal 报告中删除 html 标签

How to remove html tags from crystal report

我确实使用了 htmltexteditor 现在问题是当我创建 crystal 报告并尝试从数据集中的数据库中获取数据时它显示带有 html 标签的数据。 &它也没有显示完整的数据&也没有转到第二页。

我会尝试使用 regex.replace 但找不到我应该在哪里使用它?

using (SqlConnection con = new SqlConnection(cs))
            {int admin_id = Convert.ToInt32(Session["admin_id"].ToString());
                DataSet1 ds = new DataSet1();
                SqlDataAdapter sdp = new SqlDataAdapter("spsslct", con);
                sdp.SelectCommand.CommandType = CommandType.StoredProcedure;
                sdp.SelectCommand.Parameters.AddWithValue("@id", admin_id);
                sdp.Fill(ds.DataTable1);
                CrystalReport3 cr = new CrystalReport3();
                cr.SetDataSource(ds);   
                CrystalReportViewer2.ReportSource = cr;
                CrystalReportViewer2.DataBind();
            }

我知道 regex.replace 使用但找不到我应该在哪里使用它?

有两种方法 - 按原样解释 HTML

  1. 右键单击字段

  2. Select 格式字段

  3. Select 段落选项卡

将'文本解释更改为"HTML Text"

要替换(不是 Crystal 中的正则表达式),您需要添加公式并在报表中使用该公式,而不是直接使用字段本身。 按照这个 link :Whosebug answer to remove alphabet/symbol