SSRS

  • Hi

    It would be great if you can find some time in providing a solution for the below mentioned issue as it is very urgent that we get it resolved.

    Issue Desc:

    We have a function written in the custom code of RDL that is called by a textbox placed in the header of the report. This function creates a string and this string has to be inserted into

    a SQL table. We were planning to accomplish this by connecting to the database by including references(dlls)

    like System.Data

    However when we try to run our RDL it was throwing an error which said that we do not enough permissions to use the System.Data

    dll. We figured out that the rsserverpolicy.config file should be changed to give our ids the full trust to run the dll.

    But the clients refused to give us access to the config file.

    Now, we are trying out different options as to how to insert data from a custom code of an into a SQL table.

    The problem is that the function is called by a textbox. Had it been a table then we could have created a dataset for the table and called the sp.

    Even in that case, we cannot place a table in the header of the report.

    So, if you know how to insert data into a SQL table from an RDL ...pls let us know.

    Also, if you know any SSRS experts who can help us resolve this issue..then it would be very helpful!!!!

    --------------------------------------------------------------------------------

    k shah

  • The following might be helpful regarding your need to write data to a SQL table.

    Brian Welcker (who was on the reporting services team for several years) created a clever "report" that simulates an etch-a-sketch.

    http://blogs.msdn.com/bwelcker/archive/2005/10/29/486534.aspx

    Aside from the oddity of simulating an etch-a-sketch in SSRS, it's the only example I've come across where a report writes data to a SQL table. It may not give you the answer you're looking for, but perhaps the example will spawn new ideas for solving your problem.

    In the etch-a-sketch example, the dataset checks the values of either the @x or @y variables (i.e., did the line go left/right or up/down respectively), and then inserts a row into the underlying sql table before reading the data to refresh the drawing (report).

    Below is the sql for the dataset:

    IF (@X = 0 AND @Y = 0)

    BEGIN

    DELETE FROM Lines

    INSERT INTO Lines (Num, X, Y) VALUES (1, 0, 0)

    END

    ELSE BEGIN

    DECLARE @LastX AS INT

    DECLARE @LastY AS INT

    DECLARE @NumLines AS INT

    SET @NumLines = (SELECT MAX(Num) FROM Lines)

    SET @LastX = (SELECT X FROM Lines WHERE Num = @NumLines)

    SET @LastY = (SELECT Y FROM Lines WHERE Num = @NumLines)

    INSERT INTO Lines (Num, X, Y) VALUES (@NumLines + 1, @LastX + @X, @LastY + @Y)

    END

    SELECT Num, X, Y FROM Lines

    -- Good luck.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply