none
Report

All replies

  • Its possible but Reporting Services is not the tool for this

    The best way to implement these type of requirement is to create a DML trigger on the table for tracking changes on A,B,C,D columns and sent notification mail accordingly to your email


    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    ----------------------------
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

    Wednesday, June 12, 2019 9:37 AM
  • If you are using a system that is purchased/licensed, you need to consult with the vendor. Typically such systems are not supported if you make a schema change (of which a trigger is one). And usually one wants an ERP to be supported. 

    A rather simple approach is to make a copy of the values you want to compare in a separate database. You then compare those values with the current values in the source system and issue your report/email/notification. After this check, you then update your copy with the current values. Do this on whichever frequency you desire - daily, hourly, etc. 

    Wednesday, June 12, 2019 12:52 PM
  • Hello,

    Thx for the information. I read some  articles about DML trigger and that 's what we want.
    But I'm a beginner. 

    Can you set me on the right track ?

    For you a simple example :

    We have a table 'products' with a field 'costprice'.

    If someone changed the costprice and the new costprice is + or - 10% then we want a trigger.

    Example costprice : 10 euro. New costprice : 7 euro then we want a trigger (>10%)

    A trigger by mail (Outlook), a record in a new table or ..... ?

    Can me show me how to start with this example ?

    Thanks and regards.

    you need to create trigger using CREATE TRIGGER statement

    like

    CREATE TRIGGER TriggerName
    ON TableName
    AFTER UPDATE
    AS
    BEGIN 
    IF EXISTS(
    SELECT 1
    FROM INSERTED i
    JOIN DELETED d
    ON d.PK = i.PK
    WHERE ABS(d.costprice - i.cosetprice) > d.costprice  *  .01
    )
    EXEC sp_sent_dbmail ....
    
    END

    Here PK would be the primary key of the table

    And sp_sent_dbmail is the procedure used for sending email notifications

    You've to enable database mail feature for using this

    see

    https://www.sqlshack.com/configure-database-mail-sql-server/


    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    ----------------------------
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

    Wednesday, June 12, 2019 1:02 PM
  • Hi

    According to your description , seems the requirement is more related to the sql server admin and t-sql.

    For ssrs , seems it is hard to achieve or your requirement ,or it is not suitable .

    You could try to post your issue at admin forum for more further information.

    Thanks for your support and understanding.

    Best Regards,

    Eric Liu


    Best Regards, Eric Liu MSDN Community Support Please remember to click Mark as Answer if the responses that resolved your issue, and to click Unmark as Answer if not. This can be beneficial to other community members reading this thread.

    Friday, June 14, 2019 2:57 AM