按照水晶报表中的帮助来编写的一个程序,但是在调试没有问题,全部通过
但在打开对话框时,弹出:Runtime Error!
Program:F:\MyRdc\Debug\MyRdc.exe
abnormal program termination
部分程序段如下 (具体可见水晶报表Crystal.Reports.v9.2.2.667.CHS中的帮助)_bstr_t ReportPath("N:\\Report1.rpt");
_variant_t vtEmpty(DISP_E_PARAMNOTFOUND, VT_ERROR);// Instantiate the IApplication object
hr = CoCreateInstance(CLSID_Application, NULL, CLSCTX_INPROC_SERVER , IID_IApplication, (void **) &m_Application);
//m_Application.CreateInstance (CLSID_Application);//Open the Report using the OpenReport method
m_Report = m_Application->OpenReport(ReportPath, dummy);//Print the Report to window
m_Viewer.SetReportSource(m_Report);
//m_Viewer.Refresh ();m_Viewer.ViewReport();我查了一下是这句话有问题 m_Report = m_Application->OpenReport(ReportPath, dummy);
但是我不知道从何改起.请大家给予指导