How to combine Shapes with MasterData on the fly?
Hello,
I have a databand. I need to draw special complex shapes (consisting of other shapes as many rectangles and lines) next to each record.
So the report should be like this (I used underline insead of space because the editor trims spaces):
Shape 1_______________Record 1 Field 1
_____________________ Record 1 Field 2
______________________Record 1 Field 3
Shape 2_______________Record 2 Field 1
_____________________ Record 2 Field 2
______________________Record 2 Field 3
Shape 3_______________Record 3 Field 1
_____________________ Record 3 Field 2
______________________Record 3 Field 3
And so on. The problem is that the Shape is different depending on the field values e.g. width and height. So I need the draw every shape on by one for every record.
I would do it on the fly in Delphi code. Is it possible?
I have a databand. I need to draw special complex shapes (consisting of other shapes as many rectangles and lines) next to each record.
So the report should be like this (I used underline insead of space because the editor trims spaces):
Shape 1_______________Record 1 Field 1
_____________________ Record 1 Field 2
______________________Record 1 Field 3
Shape 2_______________Record 2 Field 1
_____________________ Record 2 Field 2
______________________Record 2 Field 3
Shape 3_______________Record 3 Field 1
_____________________ Record 3 Field 2
______________________Record 3 Field 3
And so on. The problem is that the Shape is different depending on the field values e.g. width and height. So I need the draw every shape on by one for every record.
I would do it on the fly in Delphi code. Is it possible?
Comments
Tricks - Memo2 is aligned baLeft to force it to close to Shape1.
All the rest comes from one OnBeforePrint event:
Mick
Thank you for the demo. Do you think I can do this is the OnBeforePrint of frxReport in Delphi Code too?
Search through this forum for FindObject and see how others make use of this construction.
I found such an example
TfrxMemoView (frxReport1.FindObject ('Memo1')). LineSpacing: = 100;
Mick