Quantcast
Channel: SCN : Discussion List - SAP Crystal Reports, version for Visual Studio
Viewing all articles
Browse latest Browse all 3636

Replace or insert a new custom image in place of existing picture object

$
0
0

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


Viewing all articles
Browse latest Browse all 3636

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>