Monday, February 20, 2012

Pass a non-sql parameter to report

I have a value I need to show on every report so I want to create a report parameter. It appears the only way for a report to have a parameter is for it to be a variable in the SQL WHERE clause. This value is not in the database so can't be retrieved from SQL.

How can I pass this value to the report and display it in a textbox in the footer?

Thanks.

Hello,

You do not have to use your parameter in your SQL where clause. Go to Report Parameters from the Report menu, press the Add button to create a new parameter. Give it a name and type, and hit Ok. In your report layout, create a new textbox in the footer and place this in it's expression: =Parameters!ParamName.Value

Whatever you type in that parameter box will show on your report in that textbox you just created.

Hope this helps.

Jarret

No comments:

Post a Comment