Rave Report 9 with C++Builder Newbie question

I am evaluating C++Builder XE and have come across Rave Report 9 for the first time.

I am finding it impossible to obtain the help files for Rave 9.

My problem ought to be trivial.

I am using a single sql file to produce the simplest possible report.  

there are 3 columns in the file, as follows:

ref        animal           food 
1           dog               meat 
1           cat                fish 
2           mouse          cheese 
2           chicken         corn 
3           horse            hay 
4           bird                worm

Open in new window


At runtime I want every line with an uneven ref number to be grey
and every even line to be red.

I simply need to know how and where to code this,

or, alternatively, I need to know where to get a Rave9 help file and how to set it up.

Regards
Paul
PruneBottleAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

developmentguruPresidentCommented:
Do you have the report running?  If not, we would need to start there.

I have placed a Rectangle component on the line and stretched it to the size of the line, then positioned it behind the text.  You can then use a simple event on the rectangle like this to toggle it's visibility.  Using two rectangles and swapping which is visible should not be much different.


{ Event for Rectangle1.OnBeforePrint }

function Rectangle1_OnBeforePrint(Self: TRaveRectangle);

begin
  If Rectangle1.Visible then
    Rectangle1.Visible := false;
  else
    Rectangle1.Visible := true;
  end;
end OnBeforePrint;

Open in new window

0
PruneBottleAuthor Commented:
Hi, thanks for your reply.
1)      My report calls for an irregular color-change. depending on the Ref column being odd or even.
2)      There could be 3 rows of grey then 2 rows of white then 6 rows of grey.
3)       I cannot see how to code this. Whatever I try gives me an error message.
4)       In your sample, where did you insert this code?  Is it in the Rave event or in C++Builder?
5)       Can Rave be controlled from CBuilder, so that I never have to go anywhere near their compiler?
6)      Can I avoid working with the events in Rave?
Thanks again
Regards, Paul
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PruneBottleAuthor Commented:
Hi MariEE
Thanks, Im sure somebody will eventually come up with the answer.

Regards
Paul
0
developmentguruPresidentCommented:
The same method could be used.  Instead of the IF statement checking what I showed, have it check the value of your database field.  The new code posted below may not compile as I am trying to answer this away from my system.  The idea is sound and it was done in the scripting for Rave.  The first example compiled (I tested it on my development system).  It is possible to do a code based report in Rave and I believe you can then connect your code to the events.  This is, in my opinion, about 100 times more difficult than using the tool as it was intended.

One other thing for you to consider...  Placing the code for the report in the report offers you a clear delineation between the project code (Which would need to be recompiled to change) and the report code which could be changed by sending your client a new report file (allowing you to change the report without recompiling the main application).  I guess I am more than a bit confused why you would go through tons of extra effort in order to make the project more difficult to maintain...
{ Event for Rectangle1.OnBeforePrint }

function Rectangle1_OnBeforePrint(Self: TRaveRectangle);

begin
  If SQLResultsIDField.AsInteger = 1 then
    Rectangle1.Visible := false;
    Rectangle2.Visible := true;
  else
    Rectangle1.Visible := true;
    Rectangle2.Visible := false;
  end;
end OnBeforePrint;

Open in new window

0
PruneBottleAuthor Commented:
Thanks but Rave is such a mess that I have abandoned the project.

Regards
Paul
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.