Help needed with organising a detail band dynamically
Hopefully I can describe this well enough to explain the problem I'm having.
The pipleine for my detail band contains the following information :-
JobNumber (int), Summary (varchar 50), Description (text) and Screenshot
(image)
There will be 3 scenarios :-
1) No screenshot
2) A small screenshot (less than 300 pixels wide)
3) A large screenshot (more than 300 pixels wide)
The Job Number and Summary fields are fine and show at the top of the band
alongside each other.
However, I want the Description (dbmemo) and Screenshot (dbimage) controls
to act accordingly for each of these scenarios - so let's say my detail band
is 800 pixels wide, for each scenario....
1) I want my Screenshot to be invisible and my description memo to be 800
pixels wide, i.e taking up the whole band.
2) I want my band to be organised with the description memo on the left
(i.e. alter the width accordingly to around 490), and the screenshot
alongside it on the right (left := 495).
3) I want the description to take up the full width of the detail band (800
pixels) and the screenshot image to show below it and also take up the full
width of the band.
I'm trying to make this happen in the BeforePrint of the detail band (but
I've tried it in other places too) but I just can;t seem to get it to
resize/reshape dynamically based upon the size of the image - the band
always seems to stay the same height (dependent on whatever size my image is
at design time) which gives a large amount of white space up the description
and the description always stays the same width.
I've even tried doing it with TWO screenshot fields - one large, one small
and then trying to resize everything accordingly.
Any pointers would be greatly appreciated.
The pipleine for my detail band contains the following information :-
JobNumber (int), Summary (varchar 50), Description (text) and Screenshot
(image)
There will be 3 scenarios :-
1) No screenshot
2) A small screenshot (less than 300 pixels wide)
3) A large screenshot (more than 300 pixels wide)
The Job Number and Summary fields are fine and show at the top of the band
alongside each other.
However, I want the Description (dbmemo) and Screenshot (dbimage) controls
to act accordingly for each of these scenarios - so let's say my detail band
is 800 pixels wide, for each scenario....
1) I want my Screenshot to be invisible and my description memo to be 800
pixels wide, i.e taking up the whole band.
2) I want my band to be organised with the description memo on the left
(i.e. alter the width accordingly to around 490), and the screenshot
alongside it on the right (left := 495).
3) I want the description to take up the full width of the detail band (800
pixels) and the screenshot image to show below it and also take up the full
width of the band.
I'm trying to make this happen in the BeforePrint of the detail band (but
I've tried it in other places too) but I just can;t seem to get it to
resize/reshape dynamically based upon the size of the image - the band
always seems to stay the same height (dependent on whatever size my image is
at design time) which gives a large amount of white space up the description
and the description always stays the same width.
I've even tried doing it with TWO screenshot fields - one large, one small
and then trying to resize everything accordingly.
Any pointers would be greatly appreciated.
This discussion has been closed.
Comments
1. Be sure you have your detail band's PrintHeight set to phDynamic. Also
be sure your components are set to Stretch.
2. For the version where you would like the memo above the image, try
setting the image to ShiftRelativeTo the memo object.
3. Another option you might want to try is to place three subreports inside
your detail band (each one implementing a separate scenario). Then in the
BeforePrint event based on your user selection, you can set the visible
property of the correct subreport to true and the others to false. This may
be easier than trying to manually move and resize components at runtime.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com