1767677 - How to adjust the size of an OLE object at runtime

SAP Knowledge Base Articles - public

1767677 - How to adjust the size of an OLE object at runtime



  • Crystal Reports for Visual Studio 2010
  • Visual Studio 2010


  • Use the Crystal Reports InProc RAS SDK
  • Code:
private void PictureData_Click(object sender, EventArgs e)
    CrystalDecisions.ReportAppServer.ReportDefModel.PictureObject boPictureObject;
    CrystalDecisions.ReportAppServer.ReportDefModel.Section boSection;
    rpt.Load("D:\\CPP Net\\RASXIR2Printer\\oleobject.rpt");
    rptClientDoc = rpt.ReportClientDocument;
    String MyfilePath = "C:\\temp\\sample1.jpg";
    //Determine which section to add the picture field to - in this case the report header section
    boSection = rptClientDoc.ReportDefController.ReportDefinition.ReportHeaderArea.Sections[0];
    //Add it to the report
    boPictureObject = rptClientDoc.ReportDefController.ReportObjectController.ImportPicture(MyfilePath, boSection, 1, 1);
    // Set the size of the object off the boPictureObject collection




CR2010 2010 CR4VS2010 CR4VS VS2010 NET2010 Crystal Reports for .NET Framework 4.0 crforvs 13 , KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , How To


Crystal Reports 2008 V1 ; SAP Crystal Reports, developer version for Microsoft Visual Studio