After searching and reading and failing, I hope I can find help from the gurus.
Here's what I'm doing in a nutshell:
1. The basic form (copied from dev. guide) with two tabs (one for report design, one for preview).
2. I want to filter out the records that will show up in the report that the user designs. They can choose whatever columns to display in the report, but I need to restrict which rows show up.
3. The app runs just fine, no problems, however when I preview the report I get all rows. If I go back and look at the design tab and choose "View SQL Query", it shows me the default query.
A shortened version of my code is listed below. Any help would be greatly appreciated. Thanks
' *** BEGIN CODE ***
Option Explicit
Dim m_Application As New CRAXDDRT.Application
Dim m_Report As CRAXDDRT.Report
Set m_Report = Nothing
Set m_Report = m_Application.NewReport
m_Report.Database.Tables.Add tablename, , , 1, "p2sodbc.dll", DSN, , db, user, pass
m_Report.SQLQueryString = myquery 'assume string literal
If SSTab1.Enabled = False Then SSTab1.Enabled = True
CRDesignerCtrl1.ReportObject = m_Report
CRDesignerCtrl1.EnableHelp = False
CRViewer1.ReportSource = m_Report
CRViewer1.ViewReport
CRViewer1.Zoom 1
Here's what I'm doing in a nutshell:
1. The basic form (copied from dev. guide) with two tabs (one for report design, one for preview).
2. I want to filter out the records that will show up in the report that the user designs. They can choose whatever columns to display in the report, but I need to restrict which rows show up.
3. The app runs just fine, no problems, however when I preview the report I get all rows. If I go back and look at the design tab and choose "View SQL Query", it shows me the default query.
A shortened version of my code is listed below. Any help would be greatly appreciated. Thanks
' *** BEGIN CODE ***
Option Explicit
Dim m_Application As New CRAXDDRT.Application
Dim m_Report As CRAXDDRT.Report
Set m_Report = Nothing
Set m_Report = m_Application.NewReport
m_Report.Database.Tables.Add tablename, , , 1, "p2sodbc.dll", DSN, , db, user, pass
m_Report.SQLQueryString = myquery 'assume string literal
If SSTab1.Enabled = False Then SSTab1.Enabled = True
CRDesignerCtrl1.ReportObject = m_Report
CRDesignerCtrl1.EnableHelp = False
CRViewer1.ReportSource = m_Report
CRViewer1.ViewReport
CRViewer1.Zoom 1