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
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;