PRoblems with TppJITPipeline
Hello,
I have a fairly specific problem with one of my reports.
In short, the report freezes when I try to display a value from a `TppJITPipeline`, **but only when the report consists of multiple pages**. The report never reaches the end: the **“Close”** button does not appear and remains **“Cancel”**, and clicking it does nothing. I then have to terminate the application using Task Manager.
The `TppJITPipeline` itself is very simple: it contains only **one record** and reads its values from a record. The value itself is displayed correctly in the report, so that does not seem to be the issue.
It makes no difference whether I place the field in the header band or the footer band.
As soon as I add this field, the report is no longer generated completely.
Where should I start looking?
Any help would be greatly appreciated!
kind regards,
Dirk Janssens.
For completeness, below is my TppJITPipeline component (without the fields), and the procedure jitOrderTotalenGetFieldValue :
object jitOrderTotalen: TppJITPipeline
InitialIndex = 0
RecordCount = 1
UserName = 'jitOrderTotalen'
OnCloseDataSet = jitOrderTotalenCloseDataSet
OnGetFieldValue = jitOrderTotalenGetFieldValue
Left = 304
Top = 16
object jitOrderTotalenppField1: TppField
FieldAlias = 'Huur_Dag_Bruto'
FieldName = 'Huur_Dag_Bruto'
FieldLength = 10
DataType = dtDouble
DisplayWidth = 10
Position = 0
end
.......etc...
function TDM_Reportbuilder.jitOrderTotalenGetFieldValue(
aFieldName: string): Variant;
begin
try
if OrderTotalen.DagenInWeek = 0 then
Bepaal_Offertetotalen_Op_Basis_Van_Leveringsgegevens ;
DM_Codesite.csDebug.TraceMethod( Self, 'jitOrderTotalenGetFieldValue', tmoTiming );
DM_Codesite.csDebug.Send( aFieldname);
case jitOrdertotalen.FindField(aFieldName) of
0 : REsult := OrderTotalen.Dagprijs_Bruto ;
//similar for 1..33]
34 : REsult := OrderTotalen.TeVerzekeren_PerDag * 5 ;
else Result := 'onbekend veld: ' + aFieldName ;
end;
except //The exception is never triggered
on E : Exception do
DM_Codesite.csDebug.SendException('Fout in cdsFacturenCalcFields', E );
end;
end;
I have a fairly specific problem with one of my reports.
In short, the report freezes when I try to display a value from a `TppJITPipeline`, **but only when the report consists of multiple pages**. The report never reaches the end: the **“Close”** button does not appear and remains **“Cancel”**, and clicking it does nothing. I then have to terminate the application using Task Manager.
The `TppJITPipeline` itself is very simple: it contains only **one record** and reads its values from a record. The value itself is displayed correctly in the report, so that does not seem to be the issue.
It makes no difference whether I place the field in the header band or the footer band.
As soon as I add this field, the report is no longer generated completely.
Where should I start looking?
Any help would be greatly appreciated!
kind regards,
Dirk Janssens.
For completeness, below is my TppJITPipeline component (without the fields), and the procedure jitOrderTotalenGetFieldValue :
object jitOrderTotalen: TppJITPipeline
InitialIndex = 0
RecordCount = 1
UserName = 'jitOrderTotalen'
OnCloseDataSet = jitOrderTotalenCloseDataSet
OnGetFieldValue = jitOrderTotalenGetFieldValue
Left = 304
Top = 16
object jitOrderTotalenppField1: TppField
FieldAlias = 'Huur_Dag_Bruto'
FieldName = 'Huur_Dag_Bruto'
FieldLength = 10
DataType = dtDouble
DisplayWidth = 10
Position = 0
end
.......etc...
function TDM_Reportbuilder.jitOrderTotalenGetFieldValue(
aFieldName: string): Variant;
begin
try
if OrderTotalen.DagenInWeek = 0 then
Bepaal_Offertetotalen_Op_Basis_Van_Leveringsgegevens ;
DM_Codesite.csDebug.TraceMethod( Self, 'jitOrderTotalenGetFieldValue', tmoTiming );
DM_Codesite.csDebug.Send( aFieldname);
case jitOrdertotalen.FindField(aFieldName) of
0 : REsult := OrderTotalen.Dagprijs_Bruto ;
//similar for 1..33]
34 : REsult := OrderTotalen.TeVerzekeren_PerDag * 5 ;
else Result := 'onbekend veld: ' + aFieldName ;
end;
except //The exception is never triggered
on E : Exception do
DM_Codesite.csDebug.SendException('Fout in cdsFacturenCalcFields', E );
end;
end;
Comments
Which version of ReportBuilder are you using? If you trace into the OnGetFieldValue event where does it hang? If you simply return a static string value, do you get the same behavior?
If possible please create a simple example recreating this issue and send it to us so we can research what is happening.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com