描述:
动态设置水晶报表文本对象的值,这在网上可以搜到很多C#和VB的例子,但唯独未搜到VC++&MFC的例子,请哪位好心的软林高手帮帮忙,不胜感激!以下是我写的几句代码:
this->m_Report->put_ReportTitle(_bstr_t("售电报表"));
CString c />
this->m_Report->Database->Tables->Item[1]->put_ConnectBufferString((_bstr_t)connectStr);
//this->m_Report->Database->Tables->Item[1]->SetLogOnInfo("msaccess","NewPower","","");
this->m_Report->put_SQLQueryString(_bstr_t(mySQL));
this->m_Report->PutEnableSelectDistinctRecords(TRUE);
//this->m_Report->PutRecordSelectionFormula((_bstr_t)"");
this->m_Report->PutReportAuthor((_bstr_t)"lizn7626");
this->m_Viewer.SetReportSource(this->m_Report);
this->m_Viewer.SetDisplayToolbar(TRUE);
this->m_Viewer.SetDisplayGroupTree(FALSE);
this->m_Viewer.SetDisplayBorder(FALSE);
this->m_Viewer.Refresh();
this->m_Viewer.ViewReport();
//this->m_Report->Sections->GetItem("Section1")->GetReportObjects()->GetItem("Text10")
最后一句我本意是想给文本对象动态赋值,但不知该怎么写?也许根本用不着这句。
急!!!快帮帮我,求助!!!