帮忙,水晶报表添加子报表打印时出错,提示20599错误 首先,我创建了一个父报表,父报表中没有具体的记录,接着在该报表中插入一个子报表,检索的相关记录在字报表中设计。程序打印的时候,总是提示20599错误,应该是SQL Server连接问题,请问怎样能够让代码中传递给父报表的DB连接和子报表连接上? 我在设计的报表中预览时候没有问题,显示的结果就是从DB中取得的记录,请问是什么原因 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Private Sub cmdPrint_Click() If m_enmOutputMethod = omTekiyouYMD And (Trim(txtYear.Text) = "" Or Trim(txtMonth.Text) = "") Then Call ShowMessage("300008") Exit Sub End If If m_iNumOfOutItems <= 0 Then Call ShowMessage("300009") Exit Sub End If crPrint.Connect = "DSN = " & g_tJeassIniInfo.strDSN & ";" & _ "UID = " & g_tJeassIniInfo.strUserID & ";" & _ "PWD = " & g_tJeassIniInfo.strPassword & ";DSQ= " '' 印刷 frmOutProcessing.m_iOutType = 1 frmOutProcessing.Show vbModal End Sub;crPrint是水晶报表控件 strSQL = GetSQL(m_enmOutputMethod, ip_iIndex) strRptFile = GetOutputItemInfo(ikRptFileName, ip_iIndex) strItemName = GetOutputItemInfo(ikItemName, ip_iIndex) crPrint.ReportFileName = g_tJeassIniInfo.strSystemDir & "\CrystalReport\" & strRptFile crPrint.Formulas(0) = "fSiteiYMD = """ & strSiteiYMD & """" crPrint.Formulas(1) = "" crPrint.Formulas(2) = "" crPrint.Formulas(3) = "" crPrint.Formulas(4) = "" crPrint.Formulas(5) = "" crPrint.Formulas(6) = "" crPrint.SQLQuery = strSQL iRtv = crPrint.PrintReport If iRtv <> RET_OK Then Call ShowMsgWithParams("410038", , strItemName) End If;在程序里面设置要打印的报表的sql语句,但是不知道怎么设置子报表的sql文 在CAD的VBA开发中,如何把多边形按某个轨迹裂开? 能否实现窗体内所有的控件某类事件执行同一个过程? 前端显示中的代码如何定义窗口位置? 求助 VB 借助SQL2000 验证用户名密码 的代码 数据库连接问题 vb中如何使用data控件调用设有密码的access数据库。 请问RichTextBox里怎样使用表格。 Access+SQL+ADO(400分!!!!!)求助!!不够再给!!!急急急急急急急急急 关于dbgrid颜色的问题,在线等待 请教大家,如何得到richtext当前输入点的屏幕坐标? vb保存excel文件的问题? ******散分****** 又过年了,没啥感觉呢
If m_enmOutputMethod = omTekiyouYMD And (Trim(txtYear.Text) = "" Or Trim(txtMonth.Text) = "") Then
Call ShowMessage("300008")
Exit Sub
End If
If m_iNumOfOutItems <= 0 Then
Call ShowMessage("300009")
Exit Sub
End If
crPrint.Connect = "DSN = " & g_tJeassIniInfo.strDSN & ";" & _
"UID = " & g_tJeassIniInfo.strUserID & ";" & _
"PWD = " & g_tJeassIniInfo.strPassword & ";DSQ= "
'' 印刷
frmOutProcessing.m_iOutType = 1
frmOutProcessing.Show vbModal
End Sub;crPrint是水晶报表控件
strRptFile = GetOutputItemInfo(ikRptFileName, ip_iIndex)
strItemName = GetOutputItemInfo(ikItemName, ip_iIndex)
crPrint.ReportFileName = g_tJeassIniInfo.strSystemDir & "\CrystalReport\" & strRptFile
crPrint.Formulas(0) = "fSiteiYMD = """ & strSiteiYMD & """"
crPrint.Formulas(1) = ""
crPrint.Formulas(2) = ""
crPrint.Formulas(3) = ""
crPrint.Formulas(4) = ""
crPrint.Formulas(5) = ""
crPrint.Formulas(6) = ""
crPrint.SQLQuery = strSQL
iRtv = crPrint.PrintReport
If iRtv <> RET_OK Then
Call ShowMsgWithParams("410038", , strItemName)
End If
;在程序里面设置要打印的报表的sql语句,但是不知道怎么设置子报表的sql文