I have created a custom assembly to automatically display parameter names in
a textbox an a report. The parameters display through the previ
When I run my report through 'DebugLocal' mode.
it breaks here:
Public Class ParameterList
Public Shared Function GetParameterNames()
Dim rs As New ReportingService
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim report As String = "/Commission Reports/Detailed Broker
Commission Bordereaux"
Dim forRendering As Boolean = False
Dim historyID As String = Nothing
Dim values As ParameterValue() = Nothing
Dim credentials As DataSourceCredentials() = Nothing
Dim strParam As String = ""
Dim Parameters() As ReportParameter
Parameters = rs.GetReportParameters(report, historyID, forRendering,
values, credentials)
If Not (Parameters Is Nothing) Then
Dim rp As ReportParameter
For Each rp In Parameters
strParam = rp.Prompt & strParam
Next rp
End If
Return strParam
End Function
End Class
break point : rs.Credentials = System.Net.CredentialCache.DefaultCredentials
The message reads :
"Request for the permission of type
'System.Security.Permissions.EnvironmentPermission,
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
failed."
What can I do?
Any help would be appreciated.
ThanksOn Jun 29, 3:28 am, DylCole <DylC...@.discussions.microsoft.com> wrote:
> I have created a custom assembly to automatically display parameter names in
> a textbox an a report. The parameters display through the previ
> When I run my report through 'DebugLocal' mode.
> it breaks here:
> Public Class ParameterList
> Public Shared Function GetParameterNames()
> Dim rs As New ReportingService
> rs.Credentials = System.Net.CredentialCache.DefaultCredentials
> Dim report As String = "/Commission Reports/Detailed Broker
> Commission Bordereaux"
> Dim forRendering As Boolean = False
> Dim historyID As String = Nothing
> Dim values As ParameterValue() = Nothing
> Dim credentials As DataSourceCredentials() = Nothing
> Dim strParam As String = ""
> Dim Parameters() As ReportParameter
> Parameters = rs.GetReportParameters(report, historyID, forRendering,
> values, credentials)
> If Not (Parameters Is Nothing) Then
> Dim rp As ReportParameter
> For Each rp In Parameters
> strParam = rp.Prompt & strParam
> Next rp
> End If
> Return strParam
> End Function
> End Class
> break point : rs.Credentials = System.Net.CredentialCache.DefaultCredentials
> The message reads :
> "Request for the permission of type
> 'System.Security.Permissions.EnvironmentPermission,
> mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
> failed."
> What can I do?
> Any help would be appreciated.
> Thanks
This link might be helpful.
http://odetocode.com/Articles/216.aspx
Regards,
Enrique Martinez
Sr. Software Consultant|||"EMartinez" wrote:
> On Jun 29, 3:28 am, DylCole <DylC...@.discussions.microsoft.com> wrote:
> > I have created a custom assembly to automatically display parameter names in
> > a textbox an a report. The parameters display through the previ
> >
> > When I run my report through 'DebugLocal' mode.
> > it breaks here:
> >
> > Public Class ParameterList
> >
> > Public Shared Function GetParameterNames()
> > Dim rs As New ReportingService
> > rs.Credentials = System.Net.CredentialCache.DefaultCredentials
> > Dim report As String = "/Commission Reports/Detailed Broker
> > Commission Bordereaux"
> > Dim forRendering As Boolean = False
> > Dim historyID As String = Nothing
> > Dim values As ParameterValue() = Nothing
> > Dim credentials As DataSourceCredentials() = Nothing
> > Dim strParam As String = ""
> >
> > Dim Parameters() As ReportParameter
> > Parameters = rs.GetReportParameters(report, historyID, forRendering,
> > values, credentials)
> >
> > If Not (Parameters Is Nothing) Then
> > Dim rp As ReportParameter
> > For Each rp In Parameters
> > strParam = rp.Prompt & strParam
> > Next rp
> > End If
> > Return strParam
> > End Function
> >
> > End Class
> >
> > break point : rs.Credentials = System.Net.CredentialCache.DefaultCredentials
> >
> > The message reads :
> >
> > "Request for the permission of type
> > 'System.Security.Permissions.EnvironmentPermission,
> > mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
> > failed."
> >
> > What can I do?
> >
> > Any help would be appreciated.
> >
> > Thanks
>
> This link might be helpful.
> http://odetocode.com/Articles/216.aspx
> Regards,
> Enrique Martinez
> Sr. Software Consultant
> Thanks Enrique,
This helped (on my machine). However, when I try and put my assembly on
another machine, it doesnt work. Do you have another way to display the
parameter names on a report? if not I will figure it out eventually.
Thanks again
No comments:
Post a Comment