Discussion:
Moving components in an event
(too old to reply)
Dave White
2008-06-09 22:29:41 UTC
Permalink
I have a report that is used for a number of output styles. Most of the
report is fixed, but two columns may be selectively displayed or hidden
based on report parameters. The first column, for IUPAC, seems to work OK,
but the second section, for Ratios, does not. When the _ShowIonAbun
parameter is '0' the txtRA1, txtRA2 and datRA components (two text
components and one data text component) do hide, but none of the other
components move on the page. I've tried with this code in the pages
OnBeforeReport and OnBeforePrint events - same result. Can somebody point
me to the error of my ways.

Using Rave 7.0.5 BEX with D7 Pro

Thanks

Dave White

Rave event code follows:

// handle the IUPAC column
datIUPAC.Visible := true;
txtIUPAC.Visible := True;
if Compare(RaveProject.GetParam('_ShowIUPAC'), '0') = 0 then
txtIUPAC.Visible := false;
datIUPAC.Visible := false;
end if;

// if we aren't displaying the Ratio column, move the other columns around
for looks
if Compare(RaveProject.GetParam('_ShowIonAbun'), '0') = 0 then
txtRA1.Visible := false;
txtRA2.Visible := false;
datRA.Visible := false;

txtRT.Left := 2.9;
datRT.Left := 2.9;

txtDaily1.Left := 3.8;
txtDaily2.Left := 3.8;
datDaily.Left := 3.8;

txtMean1.Left := 4.7;
txtMean2.Left := 4.7;
datMean.Left := 4.7;

txtDeviation1.Left := 5.6;
txtDeviation2.Left := 5.6;
datDeviation.Left := 5.7;
else
txtRA1.Visible := true;
txtRA2.Visible := true;
datRA.Visible := true;
end if;
David Cornelius
2008-06-11 02:07:41 UTC
Permalink
This doesn't answer your question about your code, but could you use a
mirror section instead? I think you could accomplish the same thing,
but much simpler and without writing any event handler.

I've used this technique to show different pieces of information on the
same report based on the value of a parameter--it's pretty slick.
--
David Cornelius
CorneliusConcepts.com
custom designed software
Dave White
2008-06-11 18:09:51 UTC
Permalink
Post by David Cornelius
This doesn't answer your question about your code, but could you use a
mirror section instead? I think you could accomplish the same thing,
but much simpler and without writing any event handler.
I've never actually used mirrors, so that never crossed my mind, but I'll
look into that today. Thanks for the pointer.
Dave White
2008-06-11 19:00:23 UTC
Permalink
Post by David Cornelius
I've used this technique to show different pieces of information on the
same report based on the value of a parameter--it's pretty slick.
I've just had a play, and you're right, that is pretty slick. I wish I'd
'discovered' these years ago. Thanks again.

Loading...