Hi,
I have report with editable field and in the report I invoke via dbr.editable I have to use dbr.mail along with performing the actual update. The problem I have is that somehow dbr.mail interferes with what I need to do and produces some output I need to suppress. I have tried it before and after the update statement but result is the same. I also tried my dbr.mail in separate procedure and I know it works just fine.
Just wondering what am I doing wrong, if it is indeed dbr.mail output that I need to suppress and if there is a way to do it.
Here is how the code looks like:
in the main proc:
SELECT 'dbr.editable', '[RMAStatus]', 'sp_DBR_RMA_edit_status', 'inLogin=[inLogin]', 'inID=ID', 'type=select', "select=select 'OPEN' union select 'COMPLETED' union select 'REJECTED'";
in sp_DBR_RMA_edit_status proc:
............ SELECT 'dbr.mail'; SELECT email, name, vSubject AS subject, vBody AS body FROM mydbr.mydbr_userlogin WHERE user IN (SELECT user from mydbr.mydbr_groupsusers WHERE group_id=(SELECT group_id FROM mydbr.mydbr_groups WHERE NAME=vRole));
UPDATE ssn.RMASerials SET RMASerialStatus=inStatus, TimeModified=NOW(), LastUpdateUser=inLogin WHERE ID=inID;
I know that my vRole, vSubject and vBody variables have correct values.
UPDATE statement also works just fine, however, after update in the editable field instead of new value I see "dbr.mail" and email also is not being sent.