I am using VB6 and CR8.5 (CR 8 ocx)
I have a stored proc on SQL 2000 which runs the results for and aging report. It required a datetime value. After reading up on the posts, I changed the datetime to string and used a convert function in the stored proc to change it back to datetime.
My Problem is it still does not work.
I have other programs passing strings as parameters and they all work. The difference is that the aging used a store proc with parameters (the other reports are just cystal parameters).
My Code
CrystalReport1.ReportFileName = "c:\VBDev\Aging.rpt"
Rem CrystalReport1.ParameterFields(0) = "CutoffDateS;" + Format(Calendar1.Value, "yyyy/mm/dd" + " 23:59:59;false"
Rem CrystalReport1.ParameterFields(0) = "CutoffDateS;" + CStr(Calendar1.Value) + ";false"
Rem CrystalReport1.ParameterFields(0) = "CutoffDateS;" + Text1.Text + ";true"
CrystalReport1.PrintReport
As you can see I tried using a text box and it still does not work.
All it does in nothing (the report does not pop up), I tried setting the true and false, but even with false the parameter screen does not pop up.
I think it is something to do with the parameter being a stored proc parameter.
However, if I do not set the parameterfields statement, the report opens, but requires the user to type in the parameter.
Any help appreciated
I have a stored proc on SQL 2000 which runs the results for and aging report. It required a datetime value. After reading up on the posts, I changed the datetime to string and used a convert function in the stored proc to change it back to datetime.
My Problem is it still does not work.
I have other programs passing strings as parameters and they all work. The difference is that the aging used a store proc with parameters (the other reports are just cystal parameters).
My Code
CrystalReport1.ReportFileName = "c:\VBDev\Aging.rpt"
Rem CrystalReport1.ParameterFields(0) = "CutoffDateS;" + Format(Calendar1.Value, "yyyy/mm/dd" + " 23:59:59;false"
Rem CrystalReport1.ParameterFields(0) = "CutoffDateS;" + CStr(Calendar1.Value) + ";false"
Rem CrystalReport1.ParameterFields(0) = "CutoffDateS;" + Text1.Text + ";true"
CrystalReport1.PrintReport
As you can see I tried using a text box and it still does not work.
All it does in nothing (the report does not pop up), I tried setting the true and false, but even with false the parameter screen does not pop up.
I think it is something to do with the parameter being a stored proc parameter.
However, if I do not set the parameterfields statement, the report opens, but requires the user to type in the parameter.
Any help appreciated