I have a report where I would like to select which data to show/print.
I am using UniDAC as dataconnection and it works just fine when I don't select data, just print it all.
I have a varible in my report code called varDiaryGuid that I assign the value I want to filter my records by.
In my test this variable is assigned the value {A13CE6A0-7EB0-469A-87D7-3518FB9F365A} before opening the report.
When the report starts it shows a message box Start report: {A13CE6A0-7EB0-469A-87D7-3518FB9F365A} so the variable is available as it should be.
But then I get an error saying Unexpected character - after some testing it looks like it is the { in start of the GUID.
Any one who has some ideas as what I might test next?
procedure frxReport1OnStartReport(Sender: TfrxComponent);
begin
ShowMessage('Start report: ' + varDiaryGuid);
qryDiary.Close;
qryDiary.SQL.Clear;
qryDiary.SQL.Text := 'SELECT * FROM qrymd_diary WHERE (flddiary_guid = ' + varDiaryGuid + ')';
qryDiary.Open;
end;