SSRS custom code error in Report Server

  • hi all,

    I have written a custom code in a report which accesses the database whenever a parameter is passed to it. the code deletes the particular row from database according to the parameter passed. the report and code work fine till they are in report designer in VS 2005. but once deployed in report server if a parameter is passed then it throws an error. it doesnot give any description of error but simply give "#error".

    the probable problem in my understanding may be due to the fact that the report cannot acess the custom code in report server.

    Can any body help me on this

    Thanks...

    Regards

    G.Shankar

  • there are a lot of things to take into account if you access data from custom code within a report and the error's probably due to your permissions being different when designing and running the report to running it from RM.

    Can't you put your logic into an SQL Server stored procedure? That way the data permissions are easier to handle.

  • Hi,

     

    Thanks for replying. If i put the logic in the stored procedure then i have to call the stored procedure when running the report.

     

    Can you tell me anything on what these permissions are. i donot have any idea on this

     

    Thanks..

    G.S.Beuria

  • any report can be based on a stored procedure. As long as it outputs the required rows at the end, it can do anything else based on your data before that.

    The only custom code I've written actually IN the report are for scalar functions so I haven't gone into the details about security.

  • Can you post the code?

  • try something like:

    create procedure sproc(@param1 varchar(10)) as

    begin

    delete from table1 where var1 = @param1

    select var1, var2 from table1 --or any other table

    end

Viewing 6 posts - 1 through 5 (of 5 total)

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