Printing Photo Album Report of Non empty images
I am using ReportBuilder to Display a Photo Album of images ( 4 images
across X 4 images down). These images are from 1 field in the database.
Anyway, I want to show only those images where the image field is not empy.
Is there a way to do this with an event? O r do I have to use a pipeline
of data from an SQL result.
Thanks
This discussion has been closed.
Comments
not null?
select ImageFieldName from TableName where not ImageFieldName is null
or, if this does not work for one reason or another, something likethis in
the detial band's before print:
ppReport1DetailBand.Visible := not IsFieldEmpty(FieldName);
Ed Dressel
Team DM
Hi Ed, thanks for responding. I can't use SQL, because I am using a
TADOTable dataset with a filter.
Your suggestion above works except that now there is a space where the image
would have been. I would like the next available picture to fill that spot.
No empty spaces on print out.
Anyway to do this?
THanks
Shane
Use TADOQuery and SQL. Filters are slow. Doing more work on the data
access/SQL side will result in faster, simpler reports.
If you use the DetailBand.BeforePrint event to set visibility, then in the
case in which detailband.Visible is False, no space will be used by the
detail band.
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
In my quick testing with RB 10.08, setting the visible property of the
detail band in a two column report does not leave any space. Are you
setting the visibility of the entire band or just an image? Are you using
the DetailBand.BeforePrint event?
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
ppDetailBand.Visible := not tblMainObverse.IsNull;
I do get spaces where the image was suppose to be
Thanks
Shane
Are you using left to right columns by chance. In this case the detail band
space will not be removed. You will need to instead create an ADOQuery and
return only the non-null values using its criteria. (See Nard's previous
post).
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
can try?
Shane
The Left to Right columns are somewhat limited in their ability to be
customized in ReportBuilder. You may consider using the top to bottom
columns if you can get that to look correct. The easiest solution would be
to use a simple query that prevents the empty images from even beeing sent
to the report.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Shane