question

melanieworth avatar image
melanieworth asked

Custom Code to Get Input from User in Report Builder

I have created a report for my user and they have a section where they need to enter details from their head on a regular basis. Things like planned activities, upcoming concerns, etc. The input needs to go into separate text boxes. So far I have tried parameters, using an excel spreadsheet and custom vbscript input boxes. The first two methods are too bulky and unsophisticated. I need to be able to do some sort of custom code that prompts the user for their custom text but the inputbox function seems to hang in report builder. Here is my code... Public Function getHighlights() Dim s s = InputBox("Enter the highlights for this report period", "Highlights") Return s End Function Any ideas would be gladly and gratefully accepted :-)
ssrs
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Fatherjack avatar image
Fatherjack answered
You could easily have a report with text boxes for user input that is supported by an update stored procedure rather than a select stored procedure. Link the text box values to the stored procedure parameters and when the user clicks View the values from the report will be passed into the database by way of the stored procedure. This isn't the intended use of reporting services so there are gaping holes around the transactional stability and the issue of SQL Injection so you will need to mitigate those risks but it might get you out of a pickle.
2 comments
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thanks for your answer but I think I am more worried about the having a smooth way of getting their input into the report via user entry than i am saving their data. The report is half data pulled from a SQL Server database and have data pulled from the presenter's head.
0 Likes 0 ·
Can you elaborate more on why report parameters don't work? Failing that, sounds like you need a GUI that writes back to tables in the database. Is Sharepoint an option? Do you own the database or is it something that an external vendor has sold you?
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.