R
Ravimama
I have a report where in I want to display the data from a subreport as
well as a the main report. The sub report is the Company info as the
header, for all the reports. with out a sub report added, the report
works perfectly. Once the sub report is added, every time the login
information is requested and the report does not open.
The following is the code:
m_DSBankStmnt = New DataSet
objRptBnk = New rptBankStmnt '//The main report
objclsBank = New clsBank
m_iMonth = dStmntDt.Month
m_iYear = dStmntDt.Year
m_DSBankStmnt = objclsBank.GenBnkStmnt(m_iMonth, m_iYear)
'//a unction to load the data
objRptBnk.SetDataSource(m_DTBankStmnt.Tables(0))
crvwBnkStmnt.ReportSource = objRptBnk
'R&D________________ done by me
Dim objCR As New CRSubReport
'The subreport object
objCR.SetDatabaseLogon("sa", "", "raghavendra",
"db_payroll") 'Logon info for the report
objRptBnk.OpenSubreport("CRSubReport.rpt")
'the report
name
'R&D____________
Any help will be deeply appreciated.
Ravi
well as a the main report. The sub report is the Company info as the
header, for all the reports. with out a sub report added, the report
works perfectly. Once the sub report is added, every time the login
information is requested and the report does not open.
The following is the code:
m_DSBankStmnt = New DataSet
objRptBnk = New rptBankStmnt '//The main report
objclsBank = New clsBank
m_iMonth = dStmntDt.Month
m_iYear = dStmntDt.Year
m_DSBankStmnt = objclsBank.GenBnkStmnt(m_iMonth, m_iYear)
'//a unction to load the data
objRptBnk.SetDataSource(m_DTBankStmnt.Tables(0))
crvwBnkStmnt.ReportSource = objRptBnk
'R&D________________ done by me
Dim objCR As New CRSubReport
'The subreport object
objCR.SetDatabaseLogon("sa", "", "raghavendra",
"db_payroll") 'Logon info for the report
objRptBnk.OpenSubreport("CRSubReport.rpt")
'the report
name
'R&D____________
Any help will be deeply appreciated.
Ravi