Insert Image Photo Signature in Crystal Report using C# in ASP.Net

Last Reply 13 days ago By dharmendr

Posted 13 days ago

i want to add digital signature to crystal report how can i achieve this?

Posted 13 days ago Modified on 9 days ago

Hi iammann,

You can't add signature directly. You need to save your signature as image file and then add Image on crystal Report.

To display image(signature) follow the below steps.

1. Open report design. From Crystal Reports - Insert tool select Picture which open DialogBox to select image.

2. Select the image(signature) and click open and then place in the report where you want to display the image.

3. After inserting the image you can drag it to move/resize.

I have created an example using the below article.

Generate Crystal Reports using Strongly Typed DataSet in ASP.Net using C# and VB.Net

HTML

<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true" />

C#

protected void Page_Load(object sender, EventArgs e)
{
    ReportDocument crystalReport = new ReportDocument();
    crystalReport.Load(Server.MapPath("~/CustomerReport.rpt"));
    Customers dsCustomers = GetData("SELECT TOP 10 CustomerID,Freight FROM Orders");        
    crystalReport.Database.Tables[0].SetDataSource(dsCustomers.Tables["Table"]);
    CrystalReportViewer1.ReportSource = crystalReport;
}

private Customers GetData(string query)
{
    string conString = ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
    SqlCommand cmd = new SqlCommand(query);
    using (SqlConnection con = new SqlConnection(conString))
    {
        using (SqlDataAdapter sda = new SqlDataAdapter())
        {
            cmd.Connection = con;

            sda.SelectCommand = cmd;
            using (Customers dsCustomers = new Customers())
            {
                sda.Fill(dsCustomers);
                return dsCustomers;
            }
        }
    }
}

Output

I agree, here is the link: https://www.e-iceblue.com/Introduce/spire-office-for-net-free.html