Hi
I want to pass a formula to my report with the following code... I'm trying to do this similar of sending parameters but I can't find the property or method to use the "current formula" in my report
I made the following code to receive parameters for the report:
Set NewParam = objFactory.CreateObject("CrystalReports.ParameterField"
With Session("oClientDoc"
.DataDefinition.ParameterFields
.Item(0).CopyTo NewParam
Dim NewVal
Dim ValContent
ValContent = 1
Set NewVal = ObjFactory.CreateObject("CrystalReports.ParameterFieldDefinition"
NewVal.Text = CStr(ValContent)
NewParam.CurrentValues.add NewVal
Session("oClientDoc"
.DataDefController.ParameterFieldController.Modify .Item(0), NewParam
end with
And now I have done the following INCOMPLETE code to manage formulas:
Set NewParam = objFactory.CreateObject("CrystalReports.FormulaField"
With Session("oClientDoc"
.DataDefinition.FormulaFields
.Item(0).CopyTo NewParam
Dim NewVal
Dim ValContent
ValContent = "Periodo = 'Del " & CStr(Request.Form("fechaini"
) & " al " & CStr(Request.Form("fechafin"
) & "’"
Set NewVal = ObjFactory.CreateObject("CrystalReports.FormulaField"
NewVal.Text = CStr(ValContent)
'The following lines is where I dont know wich property or method to use with the formulafield object HELP HERE!!!
NewParam.CurrentValues.add NewVal
Session("oClientDoc"
.DataDefController.FormulaFieldController.Modify .Item(0), NewParam
end with
I want to pass a formula to my report with the following code... I'm trying to do this similar of sending parameters but I can't find the property or method to use the "current formula" in my report
I made the following code to receive parameters for the report:
Set NewParam = objFactory.CreateObject("CrystalReports.ParameterField"
With Session("oClientDoc"
.Item(0).CopyTo NewParam
Dim NewVal
Dim ValContent
ValContent = 1
Set NewVal = ObjFactory.CreateObject("CrystalReports.ParameterFieldDefinition"
NewVal.Text = CStr(ValContent)
NewParam.CurrentValues.add NewVal
Session("oClientDoc"
end with
And now I have done the following INCOMPLETE code to manage formulas:
Set NewParam = objFactory.CreateObject("CrystalReports.FormulaField"
With Session("oClientDoc"
.Item(0).CopyTo NewParam
Dim NewVal
Dim ValContent
ValContent = "Periodo = 'Del " & CStr(Request.Form("fechaini"
Set NewVal = ObjFactory.CreateObject("CrystalReports.FormulaField"
NewVal.Text = CStr(ValContent)
'The following lines is where I dont know wich property or method to use with the formulafield object HELP HERE!!!
NewParam.CurrentValues.add NewVal
Session("oClientDoc"
end with