How do I use “Grouping” in “report designer” programmatically ?

I get the error “Report sections do not match data source” when I try.

In my code I have :

Set repReport.DataSource = rsRecordSet
repReport.Show

I have it this way because I add fields to the recordset after I have fetched it from the database. The added fields are the division of two other columns. I do it this way to handle the problem division with zero or null.

I think I could handle the grouping problem in the DataEnviroment, but I don’t know how to handle the division problem there.

/AKA