Horst Knorr wrote: > Robert Dent schrieb: >> Horst, >> >> Thanks. That has helped resolve the address label problem. However, >> another remains. >> >> When I click on my order entry form button to produce the invoice >> report, I get a message that the datasource for the report could not be >> enabled. The datasource is a query, which gathers customer and order >> detail data from a few tables. I can run the query successfully on >> its own. >> >> This happens on the machine running Knoda 0.8.3. The same action on the >> Knoda 0.8.2-test2 machine successfully produces the invoice report. >> Any ideas? >> >> Bob >> > Sounds like a bug. To find the bug I could need some infos. Please > start knoda from the console with the parameter --print-sql and start > the report. Send me the original query and the result of the > equivalent SQL statement on the command line > > Regards > Horst > > Horst,
When I run the original query, on which the report is based I get the following: ********** Sat Aug 25 15:13:10 2007 hk_datasource SQL: 'SELECT * FROM `HKCLASSES` WHERE (`type`=2 ) ' ********** Sat Aug 25 15:13:10 2007 hk_datasource SQL: 'SELECT `Sales0`.`SalesID` , `Sales0`.`Date` , `Sales0`.`CustomerID` , `CustomerTable1`.`Name` , `CustomerTable1`.`Address1` , `CustomerTable1`.`Address2` , `CustomerTable1`.`Address3` , `CustomerTable1`.`Address4` , `CustomerTable1`.`Address5` , `SalesDetail2`.`ProdCode` , `ProductTable3`.`Description` , `SalesDetail2`.`Qty` , `SalesDetail2`.`UnitPrice` , `Qty`*`UnitPrice` AS `Cost` , `Sales0`.`PostCharged` , `Sales0`.`GoodsValue` , `PostCharged`+`GoodsValue` AS `GTotal` , `Sales0`.`Notes` , `Sales0`.`CustOrderNo` , `CustomerTable1`.`IVaddress1` , `CustomerTable1`.`IVaddress2` , `CustomerTable1`.`IVaddress3` , `CustomerTable1`.`IVaddress4` , `CustomerTable1`.`IVaddress5` , `ProductTable3`.`LatestCost` FROM `Sales` `Sales0` INNER JOIN `CustomerTable` `CustomerTable1` ON (`CustomerTable1`.`CustID`=`Sales0`.`CustomerID`) INNER JOIN `SalesDetail` `SalesDetail2` ON (`SalesDetail2`.`SalesID`=`Sales0`.`SalesID`) INNER JOIN `ProductTable` `ProductTable3` ON (`ProductTable3`.`ProdCode`=`SalesDetail2`.`ProdCode`)' The report request produces the following output: ********** Sat Aug 25 15:06:41 2007 hk_datasource SQL: 'SELECT * FROM `HKCLASSES` WHERE (`type`=4 ) ' ********** Sat Aug 25 15:06:41 2007 hk_datasource SQL: 'SELECT * FROM `HKCLASSES` WHERE (`type`=2 ) ' ********** Sat Aug 25 15:06:41 2007 hk_datasource SQL: 'SELECT * FROM `HKCLASSES` WHERE (`type`=2 ) ' ********** Sat Aug 25 15:06:42 2007 hk_datasource SQL: 'SELECT `Sales0`.`SalesID` , `Sales0`.`Date` , `Sales0`.`CustomerID` , `CustomerTable1`.`Name` , `CustomerTable1`.`Address1` , `CustomerTable1`.`Address2` , `CustomerTable1`.`Address3` , `CustomerTable1`.`Address4` , `CustomerTable1`.`Address5` , `SalesDetail2`.`ProdCode` , `ProductTable3`.`Description` , `SalesDetail2`.`Qty` , `SalesDetail2`.`UnitPrice` , `Qty`*`UnitPrice` AS `Cost` , `Sales0`.`PostCharged` , `Sales0`.`GoodsValue` , `PostCharged`+`GoodsValue` AS `GTotal` , `Sales0`.`Notes` , `Sales0`.`CustOrderNo` , `CustomerTable1`.`IVaddress1` , `CustomerTable1`.`IVaddress2` , `CustomerTable1`.`IVaddress3` , `CustomerTable1`.`IVaddress4` , `CustomerTable1`.`IVaddress5` , `ProductTable3`.`LatestCost` FROM `Sales` `Sales0` INNER JOIN `CustomerTable` `CustomerTable1` ON (`CustomerTable1`.`CustID`=`Sales0`.`CustomerID`) INNER JOIN `SalesDetail` `SalesDetail2` ON (`SalesDetail2`.`SalesID`=`Sales0`.`SalesID`) INNER JOIN `ProductTable` `ProductTable3` ON (`ProductTable3`.`ProdCode`=`SalesDetail2`.`ProdCode`) WHERE (1=0 ) ' ********** Sat Aug 25 15:06:42 2007 hk_datasource SQL: 'SELECT `Sales0`.`SalesID` , `Sales0`.`Date` , `Sales0`.`CustomerID` , `CustomerTable1`.`Name` , `CustomerTable1`.`Address1` , `CustomerTable1`.`Address2` , `CustomerTable1`.`Address3` , `CustomerTable1`.`Address4` , `CustomerTable1`.`Address5` , `SalesDetail2`.`ProdCode` , `ProductTable3`.`Description` , `SalesDetail2`.`Qty` , `SalesDetail2`.`UnitPrice` , `Qty`*`UnitPrice` AS `Cost` , `Sales0`.`PostCharged` , `Sales0`.`GoodsValue` , `PostCharged`+`GoodsValue` AS `GTotal` , `Sales0`.`Notes` , `Sales0`.`CustOrderNo` , `CustomerTable1`.`IVaddress1` , `CustomerTable1`.`IVaddress2` , `CustomerTable1`.`IVaddress3` , `CustomerTable1`.`IVaddress4` , `CustomerTable1`.`IVaddress5` , `ProductTable3`.`LatestCost` FROM `Sales` `Sales0` INNER JOIN `CustomerTable` `CustomerTable1` ON (`CustomerTable1`.`CustID`=`Sales0`.`CustomerID`) INNER JOIN `SalesDetail` `SalesDetail2` ON (`SalesDetail2`.`SalesID`=`Sales0`.`SalesID`) INNER JOIN `ProductTable` `ProductTable3` ON (`ProductTable3`.`ProdCode`=`SalesDetail2`.`ProdCode`) WHERE (0=1 ) ' ********** Sat Aug 25 15:06:42 2007 hk_datasource SQL: 'SELECT `Sales0`.`SalesID` , `Sales0`.`Date` , `Sales0`.`CustomerID` , `CustomerTable1`.`Name` , `CustomerTable1`.`Address1` , `CustomerTable1`.`Address2` , `CustomerTable1`.`Address3` , `CustomerTable1`.`Address4` , `CustomerTable1`.`Address5` , `SalesDetail2`.`ProdCode` , `ProductTable3`.`Description` , `SalesDetail2`.`Qty` , `SalesDetail2`.`UnitPrice` , `Qty`*`UnitPrice` AS `Cost` , `Sales0`.`PostCharged` , `Sales0`.`GoodsValue` , `PostCharged`+`GoodsValue` AS `GTotal` , `Sales0`.`Notes` , `Sales0`.`CustOrderNo` , `CustomerTable1`.`IVaddress1` , `CustomerTable1`.`IVaddress2` , `CustomerTable1`.`IVaddress3` , `CustomerTable1`.`IVaddress4` , `CustomerTable1`.`IVaddress5` , `ProductTable3`.`LatestCost` FROM `Sales` `Sales0` INNER JOIN `CustomerTable` `CustomerTable1` ON (`CustomerTable1`.`CustID`=`Sales0`.`CustomerID`) INNER JOIN `SalesDetail` `SalesDetail2` ON (`SalesDetail2`.`SalesID`=`Sales0`.`SalesID`) INNER JOIN `ProductTable` `ProductTable3` ON (`ProductTable3`.`ProdCode`=`SalesDetail2`.`ProdCode`) WHERE (0=1 ) ' ********** Sat Aug 25 15:06:42 2007 hk_datasource SQL: 'SELECT `Sales0`.`SalesID` , `Sales0`.`Date` , `Sales0`.`CustomerID` , `CustomerTable1`.`Name` , `CustomerTable1`.`Address1` , `CustomerTable1`.`Address2` , `CustomerTable1`.`Address3` , `CustomerTable1`.`Address4` , `CustomerTable1`.`Address5` , `SalesDetail2`.`ProdCode` , `ProductTable3`.`Description` , `SalesDetail2`.`Qty` , `SalesDetail2`.`UnitPrice` , `Qty`*`UnitPrice` AS `Cost` , `Sales0`.`PostCharged` , `Sales0`.`GoodsValue` , `PostCharged`+`GoodsValue` AS `GTotal` , `Sales0`.`Notes` , `Sales0`.`CustOrderNo` , `CustomerTable1`.`IVaddress1` , `CustomerTable1`.`IVaddress2` , `CustomerTable1`.`IVaddress3` , `CustomerTable1`.`IVaddress4` , `CustomerTable1`.`IVaddress5` , `ProductTable3`.`LatestCost` FROM `Sales` `Sales0` INNER JOIN `CustomerTable` `CustomerTable1` ON (`CustomerTable1`.`CustID`=`Sales0`.`CustomerID`) INNER JOIN `SalesDetail` `SalesDetail2` ON (`SalesDetail2`.`SalesID`=`Sales0`.`SalesID`) INNER JOIN `ProductTable` `ProductTable3` ON (`ProductTable3`.`ProdCode`=`SalesDetail2`.`ProdCode`) WHERE (`SalesID`='3002' ) ' Mysql error message 0 : Hope that helps. Regards, Bob ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Hk-classes-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/hk-classes-discuss
