Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: SetOleLocation to OleObject Post Reply Post New Topic
Author Message
bahaa_sa5
Newbie
Newbie


Joined: 04 Apr 2009
Location: Egypt
Online Status: Offline
Posts: 2
Quote bahaa_sa5 Replybullet Topic: SetOleLocation to OleObject
     Posted: 04 Apr 2009 at 8:20am
Hi, Has anyone experienced this problem?
 
i'm using vs.net c# & Report Designer component CRAXDDRT V XI 2
i've added an OleObject in the report page header section by the folowing line
OleObject PicObject = m_Report.Sections[SecNo].AddPictureObject(Application.StartupPath + "\\DefaultLogo.bmp", 0, 0)
it's added successfully but after that when i try to change the photo path (Graphic Location) by
PicObject.SetOleLocation("NewPath + "\\AnotherLogo.bmp");
the following error msg appears :  'Access is denied'
 
I would appreciate your help ...
IP IP Logged
ehy01
Newbie
Newbie
Avatar

Joined: 29 Jan 2009
Location: Brazil
Online Status: Offline
Posts: 20
Quote ehy01 Replybullet Posted: 15 Apr 2009 at 7:46am
Hi
 
Did you solve this problem?
 
Even if you dont, can you post the code?
 
Thanks
IP IP Logged
bahaa_sa5
Newbie
Newbie


Joined: 04 Apr 2009
Location: Egypt
Online Status: Offline
Posts: 2
Quote bahaa_sa5 Replybullet Posted: 15 Apr 2009 at 9:10am
no, i didn't till now
 
this is the code:
 

CRAXDDRT.Application m_Proj = new CRAXDDRT.Application();

CRAXDDRT.Report m_Report = m_Proj.OpenReport("ReportsPath", CRAXDDRT.CROpenReportMethod.crOpenReportByDefault);

foreach (CRAXDDRT.Section Sec in m_Report.Sections)

{

if (Sec.Parent.Kind == CRAreaKind.crPageHeader)

{

OleObject PicObject = Sec.AddPictureObject(System.Windows.Forms.Application.StartupPath + "\\DefaultLogo.bmp", 0, 0);

PicObject.SetOleLocation("'C:\\AnotherLogo.bmp'");

}

}

IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum