Showing posts with label global. Show all posts
Showing posts with label global. Show all posts

Friday, March 9, 2012

reportitems collection in a custom function

Helo, I tried to use de global coleciton reportitems in a custom function, but it raise the following error: 'reportitems' is not a member of 'Microsoft.ReportingServices.ReportProcessing.ExprHostObjectModel.IReportObjectModelProxyForCustomCode'

I can use the parameters collection without any problem in the same function. I saw in documentation that parameters, fields and reportitems can't be used in inatialization (onInit()), but I think that this is not the same situation since parameters works fine.

Any idea ?

Tanks

J.Aldrin

ReportItems are not accessible in Custom Code.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de
|||

That's right, by default, custom code directly sees only a subset of collections available in report expressions.

If you call a function Foo defined in custom code from a report expression (like textbox value), you can pass ReportItems collection as an argument:

Function Foo(reportItems as ReportItems)
Return reportItems!textbox1.Value
End Function

<Textbox Name="textbox2">
...
<Value>=Code.Foo(ReportItems)</Value>
...
</Textbox>

|||But, just for information, ReportITems are ReadOnly.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

reportitems collection in a custom function

Helo, I tried to use de global coleciton reportitems in a custom function, but it raise the following error: 'reportitems' is not a member of 'Microsoft.ReportingServices.ReportProcessing.ExprHostObjectModel.IReportObjectModelProxyForCustomCode'

I can use the parameters collection without any problem in the same function. I saw in documentation that parameters, fields and reportitems can't be used in inatialization (onInit()), but I think that this is not the same situation since parameters works fine.

Any idea ?

Tanks

J.Aldrin

ReportItems are not accessible in Custom Code.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de|||

That's right, by default, custom code directly sees only a subset of collections available in report expressions.

If you call a function Foo defined in custom code from a report expression (like textbox value), you can pass ReportItems collection as an argument:

Function Foo(reportItems as ReportItems)
Return reportItems!textbox1.Value
End Function

<Textbox Name="textbox2">
...
<Value>=Code.Foo(ReportItems)</Value>
...
</Textbox>

|||But, just for information, ReportITems are ReadOnly.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

Wednesday, March 7, 2012

ReportingServices - global access problem.

Hi, experts.
I have a strange problem with accessing Analysis Services from
Reporting
Services.
Our client needs to public reports in the web site and to make them
accessible for everybody. In order to achieve it, I did the following:
1. In IIS I put the anonymous access for the virtual directory
ReportServer. (the user IWAM_hostname)
2. I granted the explorer right to the user IWAM_hostname from the web
application that permits the reports to be managed.
3. In the same application I changed the credentials for the dataset
that pointed to analysis services. I chose the "stored credentials"
(the user I specified had access rights in the corresponding cube).
Once the configuration was established, I tried to access our reports
via web. I could see reporting services interface but it was not
possible to view the data from analysis services. There was an error:
"dimension not known."
Seeing this, I decided to give analysis services rights for the
IWAM_hostname user, but it brought the same result.
When I changed the configuration of Report Server virtual directory
(instead of anonymous access, I put the windows authorization again),
everything worked fine.
I have an impression that credentials specified in the web application
are ignored.
The question is, which user is used to access the Analysis Services
from the Reporting Services when the anonymous user is set in the IIS
ReportServer directory.
All relevant information will be appreciated.
One more thing: Reporting Services has the servicepack 1 installed.
Thanks in advance
Maciej KiewraHi Maciej,
I have the exact same problem as you. I was told to try and add entry to
the RSWebApplication.config file. It is
<ReportServerExternalUrl>http://yourwebservername/ReportServer</ReportServerExternalUrl>
add this right after the <ReportServerUrl> entry. This didn't work for me
but I am interested in if it works for you. Let me know.
Thanks,
JJ
"Maciej Kiewra" wrote:
> Hi, experts.
>
> I have a strange problem with accessing Analysis Services from
> Reporting
> Services.
> Our client needs to public reports in the web site and to make them
> accessible for everybody. In order to achieve it, I did the following:
> 1. In IIS I put the anonymous access for the virtual directory
> ReportServer. (the user IWAM_hostname)
> 2. I granted the explorer right to the user IWAM_hostname from the web
> application that permits the reports to be managed.
> 3. In the same application I changed the credentials for the dataset
> that pointed to analysis services. I chose the "stored credentials"
> (the user I specified had access rights in the corresponding cube).
> Once the configuration was established, I tried to access our reports
> via web. I could see reporting services interface but it was not
> possible to view the data from analysis services. There was an error:
> "dimension not known."
> Seeing this, I decided to give analysis services rights for the
> IWAM_hostname user, but it brought the same result.
> When I changed the configuration of Report Server virtual directory
> (instead of anonymous access, I put the windows authorization again),
> everything worked fine.
> I have an impression that credentials specified in the web application
> are ignored.
> The question is, which user is used to access the Analysis Services
> from the Reporting Services when the anonymous user is set in the IIS
> ReportServer directory.
> All relevant information will be appreciated.
> One more thing: Reporting Services has the servicepack 1 installed.
>
> Thanks in advance
> Maciej Kiewra
>