Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Invalid variant operation when generating report

edited July 2002 in General
Hello,

I am trying to create a report with a TppVariable in a Group header that
prints out either 'INPUT' or 'OUTPUT' dependant on the contents of a field.

However, every time I try to preview the report I get an EPrintError
(Invalid variant operation - Cannot generate report).

I have set the timing options to calculate on GroupStart, the Group to
Group(0) and reset on to ReportEnd. The DataType is dtString. The onCalc
event code is:

if VATAnlQuery['Type'].Astring = 'I' then
GroupTypeDesc.AsString := 'VAT INPUTS'
else
GroupTypeDesc.AsString := 'VAT OUTPUTS';

I have tried replacing the GroupTypeDesc... code with value := and
value.AsString := with the same results.

If I remove this particular field, the report works perfectly.

What am I doing wrong!

Thanks

Steve Everington

Comments

This discussion has been closed.