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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Percent summary in Crystal Reports 8

Status
Not open for further replies.

johanasplund

Programmer
Dec 13, 2001
9
SE
Hello

I got a problem then trying to add a summaryfield from VB to a report using the method:

Set crSummaryFieldObject = crSection.AddSummaryFieldObject(Field1, crSTPercentage, lXpos, 0, Field2)

the error is "Invalid summary type.". Other summary types workd just fine like crSTSum

Im working in VB6 and Crystal Reports 8.0 Dev Edition

/Johan
 
Problem solved
Set crFormulaFields = crReport.FormulaFields
Set crFormulaField = crFormulaFields.Add("Percent", "Sum(" & FieldDef1 & ")/ Sum(" & FieldDef2 & ") * 100")
Set crSummaryFieldObject = crSection.AddFieldObject(crFormulaField, lXpos, 0)

/Johan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top