Adding images to a multi column band from code
Hi
I have a report that has its data added only through code, I have a list of images and need to add them to the last page of the report.
The images will be displayed in 3 columns and as many rows as required. I have set up a band with 3 columns and now need to programaticaly add the images. I have an image component on the first column, so how do I add the images sequentally?
TIA
Phil
I have a report that has its data added only through code, I have a list of images and need to add them to the last page of the report.
The images will be displayed in 3 columns and as many rows as required. I have set up a band with 3 columns and now need to programaticaly add the images. I have an image component on the first column, so how do I add the images sequentally?
TIA
Phil
Comments
decide wether to use an frxuserdatset to control the band movement, or to just set
the rowcount property of the band,(number of times it needs to repeat).
either way the rowcount prop will be the count of your list.
decide if you want to work entirely at delphi level using obp event or ongetvalue event of the report component or internal or both.
either way you will need to track where you are in your list.
working in delphi
code to load report
use find object method to find the band and set its rowcount property
code to call or show report
using the obp event
begin
var myindex:
if sender.name ='Picture1' then
begin
myindex := int(tfrxpictureview(sender).tagstr);
tfrxpictureview(sender).picture.loadfromfile((mylist(myindex).text));
end;
end;
in the obp of the band in the report
set the tagstring value of the pictureview to the line variable value
this is just one of many ways depending upon what you decide.