Hi,
I've written a basic in place editable report and its not working. Below is the code, any pointers at the mistake would be very helpful
DROP PROCEDURE IF EXISTS sp_DBR_campaignDuplicateSettings
$$
CREATE PROCEDURE sp_DBR_campaignDuplicateSettings
()
BEGIN
select 'dbr.editable', 'ParentCampaignID', 'sp_DBR_update_parentCampaign', 'inParentCampaign=ParentCampaignID', 'inCmpId=CampaignID', "select=select campaignId as ID, campaignId from database.mobc_campaigns";
select campaignId as 'CampaignID', campaignName as 'CampaignName', isDuplicate as 'IsDuplicate', parentCampaignId as 'ParentCampaignID'
from database.mobc_campaigns;
END
$$
DROP PROCEDURE IF EXISTS sp_DBR_update_parentCampaign
$$
CREATE PROCEDURE sp_DBR_update_parentCampaign
( inParentCampaign bigint(20), inCmpId bigint(20))
BEGIN
if(inParentCampaign is not null && inParentCampaign != "") then
update database.mobc_campaigns set parentCampaignId = inParentCampaign, isDuplicate=1 where campaignId = inCmpId;
else
update database.mobc_campaigns set parentCampaignId = null, isDuplicate=0 where campaignId = inCmpId;
end if;
END
$$
There are two problems here:
1. My main report(sp_DBR_campaignDuplicateSettings) shows campaign data and when I submit some value for parentCampaign, it is not getting updated in the db. Once I refresh the page, the changes are not getting reflected. I've checked that the report of the procedure "sp_DBR_update_parentCampaign" is working properly.
2. If I do not attach a separate report to the procedure "sp_DBR_update_parentCampaign", my main report for procedure "sp_DBR_campaignDuplicateSettings" is not working.
PS: Also any pointers to the logs, if any, generated by MyDBR would be really helpful.