Each time you run the report it should be looking for a new primary key to insert by OR if the RecVar.INSERT fails, then modify. What is the primary key? What is the purpose of updating records in a table every time the report is run?
Digitechkid is right, you can void the errors by using:
IF NOT l_recVariable.INSERT THEN
l_recVariable.MODIFY;
or simply:
IF NOT l_recVariable.INSERT THEN;
But he also right that the error indicates that you are probably trying to do the wrong thing in the first place. Think about what you want to happen. Do you want a new record inserted every time the report runs - if so use a different primary key. Do you want the report to insert if it doesn’t exst and update if it does, if so use the first option suggested. Do you want to insert if the record doesn’t exist and do nothing otherwise? Then you need to just put the IF statement around the insert to trap the error.