Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

SSRS 2008 R2: Using a value returned by SP as a parameter to another SP with Oracle backend

$
0
0

Hi,

First to state, I am not a master in SSRS yet, only have been using it for last three months.

I have stored procedure in Oracle which I would need to execute twice, second one having parameter needed from the first procedure.  One of the values returned from the second should be used as a base for detail lines calculations. With every little workaround I could have figured out so far, I always end up getting similar error message, all bound to the same issue, fields cannot be used as parameters. I have tried expressions, report variables and lookup function, every time ending up having the same error message.

Tried to search and apply many techniques already found on the forums about the similar problems people have had, but none of them being exactly as my issue, nor was the answers that solved their problems applicaple to my problem.

The reason why I decided to use the stored procedure is that the main database is using financial periods in the column heading and only storing the start and end date of each period, so it is not possible to refer to a certain column in the table with available period value. So I ended up writing dynamic SQL in Oracle SP to get the right value, in this case financial period's starting date. My first procedure is in its own dataset and is first started based on user input of start and end dates, it works without any problems. This procedure is finding the correct period start date and returning it in a reference cursor to dataset, amongst with other calculated values. I should use this start date returning value as a parameter to the same procedure, but in another dataset, and use it as a start date, while end date is the user supplied start date - 1. So far SSRS hasn't complained about that, since I am using an expression on existing report parameter, but it is complaining about using field value from the other dataset.

I saw in some forums subreports as suggestions, but i cannot use subreports due to the fact that I need to use the second SP calculated return values on detail lines calculations. So I am running out of ideas. Any ideas are welcome, as long as it helps to solve this issue. :)

Thanks in advance.

Jan


Viewing all articles
Browse latest Browse all 10045

Trending Articles