Einzelnen Beitrag anzeigen

shidap

Registriert seit: 28. Jan 2005
Ort: Wiesbaden
6 Beiträge
 
Delphi 6 Professional
 
#1

Button Sender Self - Reagiert N

  Alt 1. Feb 2005, 13:56
When I click on a button the Data is valid but when I write in my code that the button should be clicked it says my paramters are wrong:

Delphi-Quellcode:
procedure TGenerateReports_F.GenReport_BBClick(Sender: TObject);
var ResultQuery:String;
begin
  // If I click on this button "GenReport_..." (using my mouse) I get validateData = True
  // when I call this from another procedure: "GenReport_BBClick(Self);" It says ValiddateData = False
     if ValidateData = False then
        Exit;
     if QueryNr <> -1 then
     begin
          ResultQuery := GetResultQuery;
          if TestQuery(ResultQuery)= False then
             Exit;
     end
     else
     begin
          if BuildSql = False then
             Exit;
          DiffPageCol := '';
          if BuildReportData = False then
          begin
            Application.MessageBox(PChar('Kein Daten für diese Abfrage'),'SASE-Bericht',mb_ok);
            Exit;
          end;
          if GenerateExcelReport = False then
          begin
             Application.MessageBox(PChar('Kein Daten für diese Abfrage'),'SASE-Bericht',mb_ok);
             XLApp:= Unassigned ;
          end;
     end;


procedure TGenerateReports_F.Report_Automatik;
begin
    // From Here I get an error message
     GenReport_BBClick(Self);
end;

Any suggestions?

Thanks,
Shidap
  Mit Zitat antworten Zitat