Discussion:
Changing Text Component Left value
(too old to reply)
Greg Madison, MS
2008-05-14 14:49:33 UTC
Permalink
Hello all, I have a question that is not critical to my Rave reports but
would add to their 'helpfulness' to those who read them and make the reports
more clear.

I'm wondering if there is a method to alter the position of a Text or
DataText Rave component from code within my Delphi program. For example, to
be able to do something like:

DataText1.Left := 3.6

If I can do this, I would think that I could also pass in a color value for
a Rectangle component as well. For example, if a calculation passes it's
criteria, I could set the Rectangle1 fill color to Lime and to Red if it
fails like:

if Criteria=True then Rectangle1.FillColor := Lime else
Rectangle1.FillColor := Red;

I'm using Delphi 2007 Professional with Rave Reports 7.5 BE. Is any of this
possible? Any feedback would be helpful. Thanks in advance.

Greg
Trevor Keegan
2008-05-16 01:35:55 UTC
Permalink
Hi,

Something like http://www.nevrona.com/Default.aspx?tabid=116?

Regards
Trevor Keegan
Greg Madison, MS
2008-05-16 12:24:53 UTC
Permalink
Ahhh....I searched and searched google for my question and this didn't show
up. Wrong search parameters I guess. This Nervona tip makes sense in that
the conditions are tested in the 'OnBeforePrint' within Rave. I'll start
playing with this and see what I come up with. Will I need to have anything
added to my 'Uses' clause in my delphi? I would think not since the info is
being linked to the rave report with the DataView.

Thanks for the help

Greg
Greg Madison, MS
2008-05-16 15:04:13 UTC
Permalink
Sorry, I need to ask a followup question. At first glance, I was thinking
that the example code had to be place in the OnBeforePrint for the RvSystem1
component but thats not the case. The Tip #40 states that the code needs to
be in the OnBeforePrint event for the DataText Component as shown below.

This would be done with the following code, which would be placed in the
OnBeforePrint event of the DataText component:

if Compare(DataView1Category.AsString,'Shark') = 0 then


Where is the OnBeforePrint for the DataText component? I've never used this
before. Again, Thanks in advance for your help.

Greg
Trevor Keegan
2008-05-20 07:34:44 UTC
Permalink
Hello Greg,

Tip #40 is refering to if you are using the scripting within the RAVE file.
If you are not doing that then you should look at
http://www.nevrona.com/Default.aspx?tabid=75. Please remember though that
if you are doing this then you should make the necessary changes before
executing the RAVE file...this is because events like the OnPrint will not
fire....so it is not possible to mix Codeing with the RAVE file.

Regards
Trevor Keegan
Greg Madison, MS
2008-05-27 12:00:34 UTC
Permalink
Sorry for the late reply. I've been on vacation. I've tried Tip #75 and it
does the trick. I appreciate your help.

Greg

Loading...