Sum in Datareport without dataenvironment

10-23-2004, 03:28 AM
I have a problem with datasources in my datareport

i set the datasource of the report to a recordset at runtime, which
populates the detail section of the report

but once i try to add a SumFunction in a header/footer group i get the following error

(8570) Report Sections do not match data source

how do i get round this error?

Dennis DVR
10-23-2004, 03:58 AM
If you remove the Function control from the Data Report did your program work fine?
RptFunction control of Data Report Desginer cannot be placed under the Header section, it can only be placed under the group footer and report footer but that depends on your requirements, dependending on what field you want to sum. Basically if you have a group and detail section and you want to sum the detail section for every record in a group, then the RptFunction should be place under the Group Footer but, if you want to get all total of all the records then it should be pladed under the Report Footer.

10-23-2004, 04:09 AM
Thanks a lot, the problem was i placed RptFunction under a added Group Footer. As you said, i placed it under the Report Footer and all is right now.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum