You must Sign In to post a response.
  • Category: General

    Problem to show/hide image in crystal report 2012

    Hi All,

    I want to show / hide a image on crystal report if image not found in database then it is hide using formula in crystal report, please reply quick...

    thanks.

    Atul Sharma
  • #764163
    Why you can not try the blank image logic.

    DataTable dt = new DataTable();
    // Create the data row according to your requirement
    if (Handle your logic)) {
    fs = new FileStream("RealImage.Jpg", FileMode.Open);
    }
    else {
    fs = new FileStream("Blank.jpg", FileMode.Open);
    }
    // Read the image add it in to the data table
    CrystalReport1 MyCrystalReport1 = new CrystalReport1();
    MyCrystalReport1.SetDataSource(dt);
    CrystalReportViewer1.ReportSource = MyCrystalReport1;

    By Nathan
    Direction is important than speed

  • #764168
    Hai Atul,
    I think you can use a blank image because you can't pass null there for no show image.
    Check using the condition that if it's valid, then use that image else use the blank image. Most of the websites uses this feature because there is another reason that if there is no image, the design of the page or report may get disturbed.
    Hope it will be helpful to you.

    Regards,
    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)
    pawansoftit@gmail.com


  • Sign In to post your comments