Reputation: 483
I am using SSRS (2008R2) to create a large report against an Oracle database.
Because of the size of the report I wanted to cache the shared dataset overnight.
The dataset has a single parameter which should default to today's
date but be changeable in the report (although this would trigger
another cache).
I have struggled with this for 3 days and wanted to document how I got it to work, as well as get feedback on my approach.
Upvotes: 0
Views: 971
Reputation: 483
TO_DATE(:EffectiveDate,'YYYY-MM-DD"T"HH24:MI:SS')
(you'll see why I had to use ISO 8601 format later).:EffectiveDate
to my SQL query a parameter was automatically added to by shared dataset. This initially caused the Oracle error ORA-01008: not all variables bound
. This was resolved by deleting the dataset parameter and then clicking "refresh fields" on the dataset query screen to re-create it. The only difference apparently being that now the parameter name has a colon.=Format(Today(),"yyyy-MM-dd\T\0\0:\0\0:\0\0")
)=Format(Parameters!EffectiveDate.Value,"yyyy-MM-dd\T\0\0:\0\0:\0\0")
=Today()
:
:EffectiveDate
is the name of my Oracle string bind variable and EffectiveDate
is the name of my Report parameter. Change your code appropriately.,SYSDATE AS DATA_AGE
to my SQL Query. I was then able to reference the age of the data in my report header with First(Fields!Report_Date.Value, "<report_dataset_name")
IsNothing(User!UserID)
. I'd love to know if there was a better way.Upvotes: 1