wtorek, 9 marca 2010

Adding new parameter to WebReport (asp.net 2.0 sql server 2005)

The situation is as follows: we have existing WebReport which users stored procedure for getting data. We want to add new parameter. 1) Alter stored procedure to expect new paramter 2) In the layout tab in report designer go to menu Report => Report Parameters and add new parameter. Img. 1: CustomerIds - new parameter

Initially I thought it's enough, and you can imagine how supprised I was when trying to preview report I got an error: procedure expects parameter which was not supplied. I spend more than half an hour to figure out what caused my problem. There is third step you have to make when adding new param. 3) On dataset properties Parameter tab you have to enter the input parameter of the sp for 'name' and select report parameter under value. Img. 2: 3rd step.

That's it.

Brak komentarzy: