Using CR V8.5, VB 6, and MSRDC1.Connect
I have a main form. The user selects criteria from the Main form which I had hoped to place into some sort of WHERE clause for populating a CR. I already have the CR built with all the fields I want. Now, how do I pass the criteria for the report. I have tried:
strSelectionFormula = "{TC_HISTORY3.CREATED} = Date(" & _
Format(frmMain.cbStartDate, "yyyy/mm/dd" & ""to Date(" & _
Format(frmMain.cbStartDate, "yyyy/mm/dd" & ""
frmMain.crptTCHistory.SelectionFormula = strSelectionFormula
frmMain.crptTCHistory.Action = 1
My report does generate; however, there is no data. When I leave the criteria out and just open the report via (frmMain.crptTCHistory.Action = 1) the report does open with all of the data.
Is there something special I have to do in CR. I have seen so many examples of this and it looks so easy, but it doesn't work for me.
One more thing. How does this parameter thing work?
strDate = "Date(" & Year(frmMain.cbStartDate) & "," & Month(frmMain.cbStartDate) & "," & Day(frmMain.cbStartDate) & ""
frmMain.crptTCHistory.ParameterFields(0) = "StartDate;" & strDate & ";true"
frmMain.crptTCHistory.Action = 1
Can someone please help.
I have a main form. The user selects criteria from the Main form which I had hoped to place into some sort of WHERE clause for populating a CR. I already have the CR built with all the fields I want. Now, how do I pass the criteria for the report. I have tried:
strSelectionFormula = "{TC_HISTORY3.CREATED} = Date(" & _
Format(frmMain.cbStartDate, "yyyy/mm/dd" & ""to Date(" & _
Format(frmMain.cbStartDate, "yyyy/mm/dd" & ""
frmMain.crptTCHistory.SelectionFormula = strSelectionFormula
frmMain.crptTCHistory.Action = 1
My report does generate; however, there is no data. When I leave the criteria out and just open the report via (frmMain.crptTCHistory.Action = 1) the report does open with all of the data.
Is there something special I have to do in CR. I have seen so many examples of this and it looks so easy, but it doesn't work for me.
One more thing. How does this parameter thing work?
strDate = "Date(" & Year(frmMain.cbStartDate) & "," & Month(frmMain.cbStartDate) & "," & Day(frmMain.cbStartDate) & ""
frmMain.crptTCHistory.ParameterFields(0) = "StartDate;" & strDate & ";true"
frmMain.crptTCHistory.Action = 1
Can someone please help.