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.GenB nkStmnt(m_iMont h, m_iYear)
'//a unction to load the data
objRptBnk.SetDa taSource(m_DTBa nkStmnt.Tables( 0))
crvwBnkStmnt.Re portSource = objRptBnk
'R&D___________ _____ done by me
Dim objCR As New CRSubReport 'The subreport object
objCR.SetDataba seLogon("sa", "", "raghavendr a",
"db_payroll ") 'Logon info for the report
objRptBnk.OpenS ubreport("CRSub Report.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.GenB nkStmnt(m_iMont h, m_iYear)
'//a unction to load the data
objRptBnk.SetDa taSource(m_DTBa nkStmnt.Tables( 0))
crvwBnkStmnt.Re portSource = objRptBnk
'R&D___________ _____ done by me
Dim objCR As New CRSubReport 'The subreport object
objCR.SetDataba seLogon("sa", "", "raghavendr a",
"db_payroll ") 'Logon info for the report
objRptBnk.OpenS ubreport("CRSub Report.rpt") 'the report
name
'R&D___________ _
Any help will be deeply appreciated.
Ravi