Be sure you have your Report.NoDataBehaviors property set to ndBlankPage. Where and how are you setting the record count of the pipelines? In my testing with ReportBuilder 9.02, attaching an empty dataset to a report with this property set, gave me a completely blank page.
TYPE TPipeLineDataMode=(pdmSingleObject,pdmListBase);
TYPE TSTCPipeLine=CLASS(TppJITPipeLine) PRIVATE FData:TSTCBusinessObject; PROTECTED FUNCTION NewField(CONST strFieldName,strAlias, strName:String; CONST nDisplayWidth,nFieldLength:Integer; CONST dtDataType:TppDataType):TppField;
{Adds required fields to pipeline} PROCEDURE AddFieldsToPipeLine;VIRTUAL;ABSTRACT; FUNCTION GetPipeLineValue(aFieldName:String):Variant;VIRTUAL;ABSTRACT; PUBLIC PROCEDURE AfterConstruction;OVERRIDE;
TYPE TSTCPipeLines=CLASS PRIVATE FPipeLines:TObjectList; function GetCount: integer; function GetPipeLine(const nIndex: Integer): TppJITPipeLine; PUBLIC PROPERTY PipeLines: TObjectList READ FPipeLines WRITE FPipeLines;
procedure TSTCPipeLine.AfterConstruction; begin inherited; AddFieldsToPipeLine;
OnGetFieldValue:=GetPipeLineValue;
InitialIndex:=0; end;
constructor TSTCPipeLine.Create(const AOwner: TComponent; const objData: TSTCBusinessObject); var nRecordCount: Integer; begin INHERITED Create(AOwner);
FData:=objData;
UpdateRecordCount; end;
PROCEDURE TSTCPipeLine.UpdateRecordCount; BEGIN if FData.InheritsFrom(TSTCListBase) then RecordCount:=TSTCListbase(FData).Count else if FData.InheritsFrom(TSTCDateListBase) then RecordCount:=TSTCDateListBase(FData).Count ELSE RecordCount:=1; END;
destructor TSTCPipeLine.Destroy; begin inherited Destroy; end;
{ TSTCPipeLines }
procedure TSTCPipeLines.Add(const objPipeLine: TSTCPipeLine); begin FPipeLines.Add(objPipeLine); end;
procedure TSTCPipeLines.AfterConstruction; begin inherited; FPipeLines:=TObjectList.Create; end;
function TSTCPipeLines.GetPipeLine( const nIndex: Integer): TppJITPipeLine; begin Result:=FPipeLines[nIndex] AS TppJITPipeLine; end;
function TSTCPipeLines.GetCount: integer; begin Result:=FPipeLines.Count; end;
procedure TSTCPipeLines.UpdateRecordCounts; VAR cnt: Integer; begin FOR cnt:=0 TO FPipeLines.Count-1 DO TSTCPipeLine(FPipeLines.Items[cnt]).UpdateRecordCount; end;
procedure TSTCPipeLines.ResetRecordCounts; VAR objPipeLine: TppJITPipeLine; cnt: Integer; begin {Used to signify that report has no data at all} FOR cnt:=0 TO Count-1 DO BEGIN objPipeLine:=Items[cnt];
In my testing with a simple example (one JITPipeline and one Report), setting the RecordCount to 0 gave a blank page. I do not see in the code below where you are calling the ResetRecordCounts procedure. Are the RecordCount properties for each pipeline being set to 0 in the UpdateRecordCount method? If you trace into this code, are you certain every pipeline's RecordCount is set to 0?
If possible, please send a small example demonstrating this behavior in action in .zip format to support@digital-metaphors.com.
Comments
Be sure you have your Report.NoDataBehaviors property set to ndBlankPage.
Where and how are you setting the record count of the pipelines? In my
testing with ReportBuilder 9.02, attaching an empty dataset to a report with
this property set, gave me a completely blank page.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
We use JIT Pipelines
The code that we use for storing pipelines is shown at the bottom of this
message
Basically we inherit from your JIT pipeline and store pipelines in a list
To set the record counts, we just go through each pipeline in the list of
pipelines setting recordcount to 0
Cheers
Paul
unit clsSTCPipeLine;
interface
USES Classes,Contnrs, ppDBJIT, ppTypes, ppDB, clsSTCBusinessObject;
TYPE TPipeLineDataMode=(pdmSingleObject,pdmListBase);
TYPE TSTCPipeLine=CLASS(TppJITPipeLine)
PRIVATE
FData:TSTCBusinessObject;
PROTECTED
FUNCTION NewField(CONST strFieldName,strAlias, strName:String;
CONST nDisplayWidth,nFieldLength:Integer;
CONST dtDataType:TppDataType):TppField;
{Adds required fields to pipeline}
PROCEDURE AddFieldsToPipeLine;VIRTUAL;ABSTRACT;
FUNCTION GetPipeLineValue(aFieldName:String):Variant;VIRTUAL;ABSTRACT;
PUBLIC
PROCEDURE AfterConstruction;OVERRIDE;
property Data: TSTCBusinessObject read FData;
CONSTRUCTOR Create(CONST AOwner:TComponent;CONST
objData:TSTCBusinessObject);
destructor Destroy; override;
PROCEDURE UpdateRecordCount;
END;
TYPE TPipeLineClass=CLASS OF TSTCPipeLine;
TYPE TSTCPipeLines=CLASS
PRIVATE
FPipeLines:TObjectList;
function GetCount: integer;
function GetPipeLine(const nIndex: Integer): TppJITPipeLine;
PUBLIC
PROPERTY PipeLines: TObjectList READ FPipeLines WRITE FPipeLines;
PROPERTY Items[CONST nIndex:Integer]:TppJITPipeLine READ
GetPipeLine;DEFAULT;
property Count: integer read GetCount;
PROCEDURE AfterConstruction;OVERRIDE;
PROCEDURE Add(CONST objPipeLine:TSTCPipeLine);
PROCEDURE UpdateRecordCounts;
PROCEDURE ResetRecordCounts;
END;
TYPE TSTCPipeLineClass=CLASS OF TSTCPipeLine;
implementation
uses clsSTCListBase, clsSTCDateListBase;
{ TSTCPipeLine }
FUNCTION TSTCPipeLine.NewField(const strFieldName, strAlias, strName:
String; const nDisplayWidth, nFieldLength: Integer;
const dtDataType: TppDataType):TppField;
VAR
objField:TppField;
obj:TppMasterFieldLink;
BEGIN
{Create field}
objField:=TppField.Create(Self);
{Fill properties}
objField.FieldName:=strFieldName;
objField.FieldAlias:=strAlias;
objField.DisplayWidth:=nDisplayWidth;
objField.FieldLength:=nFieldLength;
objField.Name:=strName;
objField.DataType:=dtDataType;
{Add field to pipeline}
AddField(objField);
Result:=objField;
END;
procedure TSTCPipeLine.AfterConstruction;
begin
inherited;
AddFieldsToPipeLine;
OnGetFieldValue:=GetPipeLineValue;
InitialIndex:=0;
end;
constructor TSTCPipeLine.Create(const AOwner: TComponent;
const objData: TSTCBusinessObject);
var
nRecordCount: Integer;
begin
INHERITED Create(AOwner);
FData:=objData;
UpdateRecordCount;
end;
PROCEDURE TSTCPipeLine.UpdateRecordCount;
BEGIN
if FData.InheritsFrom(TSTCListBase) then
RecordCount:=TSTCListbase(FData).Count
else
if FData.InheritsFrom(TSTCDateListBase) then
RecordCount:=TSTCDateListBase(FData).Count
ELSE
RecordCount:=1;
END;
destructor TSTCPipeLine.Destroy;
begin
inherited Destroy;
end;
{ TSTCPipeLines }
procedure TSTCPipeLines.Add(const objPipeLine: TSTCPipeLine);
begin
FPipeLines.Add(objPipeLine);
end;
procedure TSTCPipeLines.AfterConstruction;
begin
inherited;
FPipeLines:=TObjectList.Create;
end;
function TSTCPipeLines.GetPipeLine(
const nIndex: Integer): TppJITPipeLine;
begin
Result:=FPipeLines[nIndex] AS TppJITPipeLine;
end;
function TSTCPipeLines.GetCount: integer;
begin
Result:=FPipeLines.Count;
end;
procedure TSTCPipeLines.UpdateRecordCounts;
VAR
cnt: Integer;
begin
FOR cnt:=0 TO FPipeLines.Count-1 DO
TSTCPipeLine(FPipeLines.Items[cnt]).UpdateRecordCount;
end;
procedure TSTCPipeLines.ResetRecordCounts;
VAR
objPipeLine: TppJITPipeLine;
cnt: Integer;
begin
{Used to signify that report has no data at all}
FOR cnt:=0 TO Count-1 DO
BEGIN
objPipeLine:=Items[cnt];
objPipeLine.RecordCount:=0;
END;
end;
end.
In my testing with a simple example (one JITPipeline and one Report),
setting the RecordCount to 0 gave a blank page. I do not see in the code
below where you are calling the ResetRecordCounts procedure. Are the
RecordCount properties for each pipeline being set to 0 in the
UpdateRecordCount method? If you trace into this code, are you certain
every pipeline's RecordCount is set to 0?
If possible, please send a small example demonstrating this behavior in
action in .zip format to support@digital-metaphors.com.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I will look into providing a demo but this will not be a simple task