I had to do something like this to get at the memo lines after generation. What are you going to do with this count?
uses ppDrwCmd; ... private { Private declarations } FDrawCommand: TppDrawText; public { Public declarations } end;
var Form1: TForm1;
implementation
{$R *.DFM}
uses ppTypes;
procedure TForm1.Button1Click(Sender: TObject); begin FDrawCommand := nil;
ppReport1.Print; end;
procedure TForm1.ppDetailBand1AfterPrint(Sender: TObject); begin ShowMessage(IntToStr(FDrawCommand.WrappedText.Count)); end;
procedure TForm1.ppDBMemo1DrawCommandCreate(Sender, aDrawCommand: TObject); begin if (FDrawCommand = nil) then FDrawCommand := TppDrawText(aDrawCommand);
I'm having all kind of problems printing this report.
I've mentioned in other posting and you have also been trying to help. I have a report with three subreports. The last subreport conains columns traversing LeftToRight.
In your most recent reply I can't Print columns LeftToRight and KeepTogether (very disappointing) so I'm trying another approach using a memo component.
This works fine except that it causes the printer to print in a continuous loop. So another approach is to take the lines in a memo component and add them to the TextString and see how that works.
Yeah, left to right traversal wasn't part of the initial engine design, so there are some assumptions in the engine that make it difficult to incorporate stretching controls into this layout scheme. We would have to rebuild the current engine from the ground up in order for it to be more flexible in how bands generate.
Comments
What are you going to do with this count?
uses
ppDrwCmd;
...
private
{ Private declarations }
FDrawCommand: TppDrawText;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
uses
ppTypes;
procedure TForm1.Button1Click(Sender: TObject);
begin
FDrawCommand := nil;
ppReport1.Print;
end;
procedure TForm1.ppDetailBand1AfterPrint(Sender: TObject);
begin
ShowMessage(IntToStr(FDrawCommand.WrappedText.Count));
end;
procedure TForm1.ppDBMemo1DrawCommandCreate(Sender, aDrawCommand: TObject);
begin
if (FDrawCommand = nil) then
FDrawCommand := TppDrawText(aDrawCommand);
end;
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
I'm having all kind of problems printing this report.
I've mentioned in other posting and you have also been trying to help. I
have a report with three subreports. The last subreport conains columns
traversing LeftToRight.
In your most recent reply I can't Print columns LeftToRight and KeepTogether
(very disappointing) so I'm trying another approach using a memo component.
This works fine except that it causes the printer to print in a continuous
loop. So another approach is to take the lines in a memo component and add
them to the TextString and see how that works.
Gary
there are some assumptions in the engine that make it difficult to
incorporate stretching controls into this layout scheme. We would have to
rebuild the current engine from the ground up in order for it to be more
flexible in how bands generate.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com