I have a crystal report with default logo displayed. During runtime, i need to replace that picture with another image dynamically.
Things that i tried are:
Using Graphic location formula set to custom image path. When crystal report is exported, i see the same old image. When i right click on old image and check the graphic location formula, the path is pointing to the custom image path. I dont know why this is not working. check the below code:
oCustomPicture = CrystalDecisions.ReportAppServer.ReportDefModel.PictureObject
oCustomPicture = oPicture.Clone(True)
oCustomPicture.GraphicLocationFormula = cf '(condition formula with custom location path)
oRpt.ReportDocument.ReportClientDocument.ReportDefController.ReportObjectController.Modify(oPicture, oCustomPicture)
Second thing, i am trying is removing the old image and then trying to add a new picture object. Trying to figure out how do i do this.
I am using CR XI sp5.
Any help is appreciated.
Thanks,
Deepak P