我写的水晶报表模板数据源是XML文件,是在做模板时就加入这个文件的,但是它就不随着XML中数据的改变而改变,现在需要的应该是动态的报表 该怎么办呢?
我后来想想,觉得不应该在模板里就加载XML文件,而应该在程序里动态地加载XML文件,对吗?但是问题就在于我不知道怎样在程序里加载这个文件,我的程序是这样的:
void CDisplayDlg::OnButton1()
{
IApplicationPtr m_Application;
IReportPtr m_Report;
m_Application.CreateInstance (__uuidof(Application));
m_Report=m_Application->OpenReport("C:\\Documents and Settings\\xx\\桌面\\Report2.rpt");
m_CRViewer1.SetReportSource(m_Report);
m_CRViewer1.Refresh();
m_CRViewer1.ViewReport();
}
请各位大虾赐教啊~~ 真的真的十二万分的感谢啊!!!
我后来想想,觉得不应该在模板里就加载XML文件,而应该在程序里动态地加载XML文件,对吗?但是问题就在于我不知道怎样在程序里加载这个文件,我的程序是这样的:
void CDisplayDlg::OnButton1()
{
IApplicationPtr m_Application;
IReportPtr m_Report;
m_Application.CreateInstance (__uuidof(Application));
m_Report=m_Application->OpenReport("C:\\Documents and Settings\\xx\\桌面\\Report2.rpt");
m_CRViewer1.SetReportSource(m_Report);
m_CRViewer1.Refresh();
m_CRViewer1.ViewReport();
}
请各位大虾赐教啊~~ 真的真的十二万分的感谢啊!!!
另外
你水晶报表是下载的控件么?
能给发给我不?
[email protected]
最好发下水晶报表的实例给我
我想学下水井报表
谢谢
例子很简单的,我发的这段代码就是一个简单的例子。