Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending formula trough ASP... complete my code!!!

Status
Not open for further replies.

lechuz

Programmer
Jan 8, 2003
26
0
0
MX
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top