Using Parameters with Rave

Category

RAVE - General

Question

How do you pass parameters into a Rave report?

Solution

To pass a parameter into Rave you need to call the SetParam procedure as follows:

Delphi Example:

With RaveProject1 do begin
    Open;
    SetParam('ParamName','ParamValue');
    ExecuteReport('Report1');
    Close;
  end; { with }

C++Builder Example:

TRaveProject *rp = dynamic_cast(RaveProject1);
  rp->Open();
  rp->SetParam("ParamName","ParamValue");
  rp->ExecuteReport("Report1");
  rp->Close();

Parameters are always passed as strings. To define a parameter within Rave you need to click on the RaveProject item in the tree view, which is always the very first item listed. Now look down in the PropertyPanel. You will see a property called "Parameters." If you double-click on this field it will bring up a strings editor. You should enter your parameter names with one on each line. For information on printing parameters see Printing the current page number.