M_application.createinstance (_ uuidof (Application ));
_ Bstr_t strrptname = "E: // cri.pdf // multdetailsexamp // dataandpic. rpt ";
_ Bstr_t strpicname = "E: // cri.pdf // multdetailsexamp // areastudytemp.bmp ";
// I don't know why. If the size of the newly modified image is not adjusted before the report is opened, a dialog box will pop up, saying that the link is incorrect. I don't know why, expected Solution
Hinstance hint = ShellExecute (this-> m_hwnd, "open", "kodakimg.exe", strpicname, "", sw_show );
M_report = m_application-> openreport (_ bstr_t) strrptname );
// Modify the existing image Ole link in the report
Pchartobj = NULL;
Functions = NULL;
Ction = NULL;
Pcroleobj = NULL;
_ Variant_t var;
Variantinit (& var );
Var. Vt = vt_i2;
Var. ival = 1;
_ Bstr_t BSTR;
Long LG;
Ction = m_report-> getareas ()-> getitem ("RH")-> getsections ()-> getitem (VAR );
BSTR = ction-> getcssclass ();
BSTR = ction-> getname ();
Preportobj = ction-> reportobjects-> getitem ("pic1 ");
If (preportobj-> kind = croleobject)
{
Pcroleobj = preportobj;
}
Preportobj-> name = "Crystal Report test Legend 2 ";
//...........