I have a few reports that have been playing up, and as I have traced through them it appears to be an issue with the thousands separator being passed in function parameters. An example is shown below:
select 'dbr.report', 'sp_DBR_stocklocpop', '[edit]', 'iItemID=GRNItemID', 'vGRN=GRNNumber', 'iItemNum=GRNItemNo', 'vStatus=GRNItemStatus', 'vDepot=Depot', 'nDWeight=DepotWeight', 'iWare=WarehouseID', 'iLocID=GRNItemLocationLocationID';
select WarehouseID, GRNItemLocationLocationID, GRNItemID, GRN, Depot, GRNNumber, GRNItemNo, Description, StockFamily, SupplierName, GRNItemStatus, AvailableWeight, DepotWeight, GRNItemLocationLocation, GRNItemLocationBin, GRNItemLocationWeight, ActiveOnLTS, 'EDIT LOCATION' as '[edit]' from #temp where AvailableWeight > 0
When I hover the mouse cursor over the hyper link I can see that p1 is passing the thousand parameter of GRNItemID rather than just the value.
/mydbr/report.php?r=46&p1=182%2C521&p2=UK-R%2FPGRN%2F13%2F0023&p3=2
Obviously this causes problems with other reports, specifically in one incidence where a pop up uses the GRNItemID along with the built in isLogin param
CREATE PROCEDURE sp_DBR_puLocations @mydbr_param2 int, @inLogin varchar(30)
Unfortunately, when this procedure is called to populate the popup box the following error is returned
DB error SQLSTATE: 42000, code: 8144
message: message: [Microsoft][SQL Server Native Client 11.0][SQL Server]Procedure or function sp_DBR_puLocations has too many arguments specified.
SQL: sp_DBR_puLocations 182,521,'dba'
Because the thousand separator is being passed as part of an int variable the popup things it is being passed three paramaters (182 followed by 521 followed by 'dba') when in actuality it is only being passed 2 (182521 followed by 'dba').
How can I stop myDBR from passing on the thousand separator as part of an integer value?