![]() |
Problems with String-Report-Parameter
I'm using Reportmanager 2.4 e from Sourceforge.
I've a Report with the following Select :
SQL-Code:
mitabeiternamebeg is my Parameter, value e.g. 'M'. In the Preview
SELECT m.id, m.vorname, m.nachname, m.email,tm.User,t.Bezeichnung
FROM mitarbeiter as m left JOIN termine_mitarbeiter as tm ON m.id = tm.User left JOIN termine as t ON tm.termin=t.id where m.nachname like Concat(:mitarbeiternamebeg,'%') order by m.id Asc; the Report is working fine, and there are all Records with nachname beginning with e.g. M. But now I'm setting the Parameter as Char or Widechar in a Delphi- Program, using the Library reportman.ocx, dated from the 18.05.05. The Constant-Value of PARTYPE_CHAR=256. It s all working fine , but there's no Output in the resulting Pdf- File. What s wrong, Im using a Mysql-Database ??? There's no Problem with Integer or Float - Type. But String-Types aren't working. ************************************* I'm using the following Delphi-Code : ************************************* *************************************
Delphi-Quellcode:
:gruebel:
begin
ReportHandle := rp_open(PChar(ReportFile)); if ReportHandle = 0 then raise Exception.Create(rp_lasterror()); try if Assigned(Params) then for Index := 0 to Params.Count - 1 do begin // jetzt alle uebergebenen Parameter setzen thePar := TDialogReportParameter(Params.Objects[Index]); // als Objekt liegen TDialogReportParameter vor S:= thePar.Wert; Result := 0; case thePar.Typ of ............. PARTYPE_CHAR: Result := rp_setparamvalue(ReportHandle, PChar (thePar.Name), thePar.Typ, @S); .......... end; if Result = 0 then raise Exception.Create(rp_lasterror()); end; Result := rp_execute(ReportHandle, PChar(Output), 0, 1); //S:='Test Druckausgabe'; //Result := rp_print(ReportHandle, PChar(S),1, 1); if Result = 0 then raise Exception.Create(rp_lasterror()); finally Result := rp_close(ReportHandle); if Result = 0 then raise Exception.Create(rp_lasterror()); end; end; [edit=SirThornberry]Delphi-Tags and SQL-Tags set - Mfg, SirThornberry[/edit] |
Alle Zeitangaben in WEZ +1. Es ist jetzt 09:28 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz