TfrxDBXQuery in the AddValue method
hi,
I'm a beginner to Fast-Reports and I'm trying to build a report that I use a "CrossTab Object".
I have a TfrxDBXQuery Called qryReport and I need to fill the CrossTab with the results of this query.
Before you guys start telling me to use a "DB-Cross Tab Oject" I will say that I have a special need to use a plain "CrossTab Object" for I'm treating the data as the report prints the cells.
I'm using the OnBeforePrint Event and this is what I'm doing:
while not qryReport.Eof do
begin
AddValue([DateToStr(qryReport.Fields[0].Value)], [qryReport.Fields[2].Value)], [qryReport.Fields[1].Value]);
qryReport.Next;
end;
At my query it returns datas from the Date, Value and Name fields which are being called with the qrytReports.Fields[POSITION].Value thing.
The problem is that I keep getting this exception:
"exception class EStringListError with message 'List out of bounds(3).'" from the
fr_iclassesrtti Unit.
I don't know exactly what I'm doing wrong, if you could help me with that I'd apreciated that a lot!!
Thanks again!!
I'm a beginner to Fast-Reports and I'm trying to build a report that I use a "CrossTab Object".
I have a TfrxDBXQuery Called qryReport and I need to fill the CrossTab with the results of this query.
Before you guys start telling me to use a "DB-Cross Tab Oject" I will say that I have a special need to use a plain "CrossTab Object" for I'm treating the data as the report prints the cells.
I'm using the OnBeforePrint Event and this is what I'm doing:
while not qryReport.Eof do
begin
AddValue([DateToStr(qryReport.Fields[0].Value)], [qryReport.Fields[2].Value)], [qryReport.Fields[1].Value]);
qryReport.Next;
end;
At my query it returns datas from the Date, Value and Name fields which are being called with the qrytReports.Fields[POSITION].Value thing.
The problem is that I keep getting this exception:
"exception class EStringListError with message 'List out of bounds(3).'" from the
fr_iclassesrtti Unit.
I don't know exactly what I'm doing wrong, if you could help me with that I'd apreciated that a lot!!
Thanks again!!
Comments
You certain that , in request there is all field Can in query no several Fields?
It was a problem in the way I was building another thing that was returning that exception, because there is no debuger in fast-reports I got kind of messed up with this thing and didn't quite know wether it was a mistake at the addValue Method or anywhere else.
Thank you for the help you extend to me always!!