Add an ole link object to the Crystal Report and perform operations on it.

Source: Internet
Author: User
Tags ole

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 ";

//...........

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.