Topic: Report with variables

How can i get some textbox on a report? SOmething like this, for instance

procedure TesourClube_Button6_OnClick (Sender: TObject; var Cancel: boolean); // Recibo Tesouraria

var
edClube: string;
begin
    edClube := '' + tesourclube.edit1.text;
    frmlogin.frxReport.Variables.Clear;
    frmlogin.frxReport.Variables[' ' + 'ParRecibo'] := Null;
    frmlogin.frxReport.Variables['Clube'] := edClube;

end;

When i try to preview the variable in the report i get this error message

Post's attachments

Attachment icon ReportError.PNG 8.87 kb, 269 downloads since 2018-03-02 

Re: Report with variables

Hello.


Check it out

procedure TesourClube_Button6_OnClick (Sender: TObject; var Cancel: boolean); // Recibo Tesouraria
var
    s: string;
begin
    s := TesourClube.Edit1.Text;
    frmlogin.frxReport.Variables.Clear;
    frmlogin.frxReport.Variables[' ' + 'My Category 1'] := Null;
    frmlogin.frxReport.Variables['Clube'] := ''''+s+'''';
end;
Dmitry.