Showing posts with label class. Show all posts
Showing posts with label class. Show all posts

Wednesday, March 28, 2012

RSClientPrint.Print

I am having an issue with the RSClientPrint control. We have a .net Proxy
class (ASP.NET handler) which is being called by the RSClientPrint.Print
command, bringing the data from Reporting Services and relaying it back to
the control after regex'ing all the urls to point back to our proxy. The
main reason for this is that Reporting Services will not be available from
the client machine as it's hidden behind a firewall.
When executing the Print function, The printer dialog box is displayed,
which when accepted prints the report just as expected, however once the job
has been sent to the printer an `unknown error` is thrown by the Print
Method which is caught by the activex control, which displays an error
message in the screen stating the print failed. Even though the print
succeeds.
The before and after shot are displayed here:
= = = = = =
BEFORE: RSClientPrint.Print("http://{ourwebmachinename}/ReportServer",
"%2fFolder+1%2fFolder+2%2fReport+1&name=administrator", "Report 1")
AFTER:
RSClientPrint.Print("http://{ourwebmachinename}/{ourapp}/ReportServer.ashx",
"%2fFolder+1%2fFolder+2%2fReport+1&name=administrator", "Report 1")
= = = = = =
Removing our proxy and pointing it directly to Reporting Services works
fine, I am wondering why this message is being displayed at all, and the
really frustrating part is that it is a meaningless error.
What I am looking for is an answer to the following:
1. What exactly is the print method doing?
2. At what points could it fail?
3. Has anyone encountered a similar problem, and how have they resolved it?
Thanks for your TimeHello James,
It seems the data returned by your proxy is a little different from that of
reportserver.
You may want to use some tool to catch the HTTP data and compare with the
one from server. Once the preview mode is initiated or the report is
printed, the control instructs the Report Server to print the report using
the EMF rendering extension.
Thanks & Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--
| From: "James Snape" <jim_snape.at.hotmail.com@.online.nospam>
| Subject: RSClientPrint.Print
| Date: Wed, 10 Aug 2005 14:58:13 +0100
| Lines: 38
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| Message-ID: <e5bCOObnFHA.420@.TK2MSFTNGP09.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.reportingsvcs
| NNTP-Posting-Host: exony-ltd-02.altohiway.com 213.83.66.226
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.reportingsvcs:50071
| X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
|
| I am having an issue with the RSClientPrint control. We have a .net Proxy
| class (ASP.NET handler) which is being called by the RSClientPrint.Print
| command, bringing the data from Reporting Services and relaying it back
to
| the control after regex'ing all the urls to point back to our proxy. The
| main reason for this is that Reporting Services will not be available
from
| the client machine as it's hidden behind a firewall.
|
| When executing the Print function, The printer dialog box is displayed,
| which when accepted prints the report just as expected, however once the
job
| has been sent to the printer an `unknown error` is thrown by the Print
| Method which is caught by the activex control, which displays an error
| message in the screen stating the print failed. Even though the print
| succeeds.
|
| The before and after shot are displayed here:
| = = = = = =|
| BEFORE: RSClientPrint.Print("http://{ourwebmachinename}/ReportServer",
| "%2fFolder+1%2fFolder+2%2fReport+1&name=administrator", "Report 1")
|
| AFTER:
|
RSClientPrint.Print("http://{ourwebmachinename}/{ourapp}/ReportServer.ashx",
| "%2fFolder+1%2fFolder+2%2fReport+1&name=administrator", "Report 1")
|
| = = = = = =|
| Removing our proxy and pointing it directly to Reporting Services works
| fine, I am wondering why this message is being displayed at all, and the
| really frustrating part is that it is a meaningless error.
|
| What I am looking for is an answer to the following:
| 1. What exactly is the print method doing?
| 2. At what points could it fail?
| 3. Has anyone encountered a similar problem, and how have they resolved
it?
|
| Thanks for your Time
|
|
||||Thanks Peter I'll give that a go!
"Peter Yang [MSFT]" <petery@.online.microsoft.com> wrote in message
news:0P9fa6hnFHA.3472@.TK2MSFTNGXA01.phx.gbl...
> Hello James,
> It seems the data returned by your proxy is a little different from that
> of
> reportserver.
> You may want to use some tool to catch the HTTP data and compare with the
> one from server. Once the preview mode is initiated or the report is
> printed, the control instructs the Report Server to print the report using
> the EMF rendering extension.
> Thanks & Regards,
> Peter Yang
> MCSE2000/2003, MCSA, MCDBA
> Microsoft Online Partner Support
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> =====================================================>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> --
> | From: "James Snape" <jim_snape.at.hotmail.com@.online.nospam>
> | Subject: RSClientPrint.Print
> | Date: Wed, 10 Aug 2005 14:58:13 +0100
> | Lines: 38
> | X-Priority: 3
> | X-MSMail-Priority: Normal
> | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
> | X-RFC2646: Format=Flowed; Original
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
> | Message-ID: <e5bCOObnFHA.420@.TK2MSFTNGP09.phx.gbl>
> | Newsgroups: microsoft.public.sqlserver.reportingsvcs
> | NNTP-Posting-Host: exony-ltd-02.altohiway.com 213.83.66.226
> | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
> | Xref: TK2MSFTNGXA01.phx.gbl
> microsoft.public.sqlserver.reportingsvcs:50071
> | X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
> |
> | I am having an issue with the RSClientPrint control. We have a .net
> Proxy
> | class (ASP.NET handler) which is being called by the RSClientPrint.Print
> | command, bringing the data from Reporting Services and relaying it back
> to
> | the control after regex'ing all the urls to point back to our proxy. The
> | main reason for this is that Reporting Services will not be available
> from
> | the client machine as it's hidden behind a firewall.
> |
> | When executing the Print function, The printer dialog box is displayed,
> | which when accepted prints the report just as expected, however once the
> job
> | has been sent to the printer an `unknown error` is thrown by the Print
> | Method which is caught by the activex control, which displays an error
> | message in the screen stating the print failed. Even though the print
> | succeeds.
> |
> | The before and after shot are displayed here:
> | = = = = = => |
> | BEFORE: RSClientPrint.Print("http://{ourwebmachinename}/ReportServer",
> | "%2fFolder+1%2fFolder+2%2fReport+1&name=administrator", "Report 1")
> |
> | AFTER:
> |
> RSClientPrint.Print("http://{ourwebmachinename}/{ourapp}/ReportServer.ashx",
> | "%2fFolder+1%2fFolder+2%2fReport+1&name=administrator", "Report 1")
> |
> | = = = = = => |
> | Removing our proxy and pointing it directly to Reporting Services works
> | fine, I am wondering why this message is being displayed at all, and the
> | really frustrating part is that it is a meaningless error.
> |
> | What I am looking for is an answer to the following:
> | 1. What exactly is the print method doing?
> | 2. At what points could it fail?
> | 3. Has anyone encountered a similar problem, and how have they resolved
> it?
> |
> | Thanks for your Time
> |
> |
> |
>

Monday, March 26, 2012

rsAccessDenied

I have a reportViewer control on a webform. In my partial class I set the report path, server and parameters in the Page_Load. When I run the report I get this error:

  • The permissions granted to user 'NT AUTHORITY\NETWORK SERVICE' are insufficient for performing this operation. (rsAccessDenied)

    Here is my code:

    Dim u As New UriTypeConverter
    Dim ReportParameters(0) As ReportParameter


    ReportParameters(0) = New ReportParameter("ProjectKey", 262)
    rv.ShowParameterPrompts = False
    rv.ServerReport.ReportServerUrl = u.ConvertFromString("http://localhost/ReportServer/")
    rv.ServerReport.ReportPath = "/Test/Duplicate_MIU_Report"
    rv.ServerReport.SetParameters(ReportParameters)

    Have you properly granted permission for your web user? Go to the configuration tool, and look for any red X on the left hand side. Open the "Web service identity" and make sure your web user is 'NT AUTHORITY\NETWORK SERVICE". Then go to "Database Setup" panel. I think you are using "Service Credentials". Reapply the settings may fix your problem.|||

    I have NT AUTHORITY\NetworkService as the service account (it is grayed out so it is not possible to change), and I have Service Credentials as the credentials type in the database setup. There are no red X's. Still get the same error.

    In addition, I get this DCOM error in the system log:

    The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID

    {BA126AD1-2166-11D1-B1D0-00805FC1270E}

    to the user NT AUTHORITY\NETWORK SERVICE SID (S-1-5-20). This security permission can be modified using the Component Services administrative tool.

    I'm not exactly sure what and how to do in Component Services admin tool.

    |||

    This thread may help you with the DCOM error:

    http://forums.microsoft.com/MSDN/showpost.aspx?postid=258889&siteid=1

    |||Netman has both local activation AND execution|||Do you see Network Services part of RSExec role in your report server catalog db and temp db?|||Yes|||Yes, Network Services is RSExec role in report server catalog db and temp db.|||It looks like Network Service account is not allowed to set parameters. I am not sure what is the mininum permission set. Can you try adding the account as a content manager to the home folder?|||If I right-click in design view in VS2005, the report runs fine. It doesn't work when I try to run in a browser and is being served up by my dev IIS server.|||I have added the NetworkService as administrator and still no go.|||That did it. Was confused in the ReportManager. Simple fix. Seems like lots of people having same problem. Thank you for your help|||Sorry--Don't follow what the fix was. What did it?|||

    Went into Report Manager and gave NT Authority\NetworkService the necessary role assignments.

    |||Thanks--got past that one, now I get to deal with the database access permissions lol...
  • rsAccessDenied

    I have a reportViewer control on a webform. In my partial class I set the report path, server and parameters in the Page_Load. When I run the report I get this error:

  • The permissions granted to user 'NT AUTHORITY\NETWORK SERVICE' are insufficient for performing this operation. (rsAccessDenied)

    Here is my code:

    Dim u As New UriTypeConverter
    Dim ReportParameters(0) As ReportParameter


    ReportParameters(0) = New ReportParameter("ProjectKey", 262)
    rv.ShowParameterPrompts = False
    rv.ServerReport.ReportServerUrl = u.ConvertFromString("http://localhost/ReportServer/")
    rv.ServerReport.ReportPath = "/Test/Duplicate_MIU_Report"
    rv.ServerReport.SetParameters(ReportParameters)

    Have you properly granted permission for your web user? Go to the configuration tool, and look for any red X on the left hand side. Open the "Web service identity" and make sure your web user is 'NT AUTHORITY\NETWORK SERVICE". Then go to "Database Setup" panel. I think you are using "Service Credentials". Reapply the settings may fix your problem.|||

    I have NT AUTHORITY\NetworkService as the service account (it is grayed out so it is not possible to change), and I have Service Credentials as the credentials type in the database setup. There are no red X's. Still get the same error.

    In addition, I get this DCOM error in the system log:

    The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID

    {BA126AD1-2166-11D1-B1D0-00805FC1270E}

    to the user NT AUTHORITY\NETWORK SERVICE SID (S-1-5-20). This security permission can be modified using the Component Services administrative tool.

    I'm not exactly sure what and how to do in Component Services admin tool.

    |||

    This thread may help you with the DCOM error:

    http://forums.microsoft.com/MSDN/showpost.aspx?postid=258889&siteid=1

    |||Netman has both local activation AND execution|||Do you see Network Services part of RSExec role in your report server catalog db and temp db?|||Yes|||Yes, Network Services is RSExec role in report server catalog db and temp db.|||It looks like Network Service account is not allowed to set parameters. I am not sure what is the mininum permission set. Can you try adding the account as a content manager to the home folder?|||If I right-click in design view in VS2005, the report runs fine. It doesn't work when I try to run in a browser and is being served up by my dev IIS server.|||I have added the NetworkService as administrator and still no go.|||That did it. Was confused in the ReportManager. Simple fix. Seems like lots of people having same problem. Thank you for your help|||Sorry--Don't follow what the fix was. What did it?|||

    Went into Report Manager and gave NT Authority\NetworkService the necessary role assignments.

    |||Thanks--got past that one, now I get to deal with the database access permissions lol...
  • rsAccessDenied

    I have a reportViewer control on a webform. In my partial class I set the report path, server and parameters in the Page_Load. When I run the report I get this error:

  • The permissions granted to user 'NT AUTHORITY\NETWORK SERVICE' are insufficient for performing this operation. (rsAccessDenied)

    Here is my code:

    Dim u As New UriTypeConverter
    Dim ReportParameters(0) As ReportParameter


    ReportParameters(0) = New ReportParameter("ProjectKey", 262)
    rv.ShowParameterPrompts = False
    rv.ServerReport.ReportServerUrl = u.ConvertFromString("http://localhost/ReportServer/")
    rv.ServerReport.ReportPath = "/Test/Duplicate_MIU_Report"
    rv.ServerReport.SetParameters(ReportParameters)

    Have you properly granted permission for your web user? Go to the configuration tool, and look for any red X on the left hand side. Open the "Web service identity" and make sure your web user is 'NT AUTHORITY\NETWORK SERVICE". Then go to "Database Setup" panel. I think you are using "Service Credentials". Reapply the settings may fix your problem.|||

    I have NT AUTHORITY\NetworkService as the service account (it is grayed out so it is not possible to change), and I have Service Credentials as the credentials type in the database setup. There are no red X's. Still get the same error.

    In addition, I get this DCOM error in the system log:

    The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID

    {BA126AD1-2166-11D1-B1D0-00805FC1270E}

    to the user NT AUTHORITY\NETWORK SERVICE SID (S-1-5-20). This security permission can be modified using the Component Services administrative tool.

    I'm not exactly sure what and how to do in Component Services admin tool.

    |||

    This thread may help you with the DCOM error:

    http://forums.microsoft.com/MSDN/showpost.aspx?postid=258889&siteid=1

    |||Netman has both local activation AND execution|||Do you see Network Services part of RSExec role in your report server catalog db and temp db?|||Yes|||Yes, Network Services is RSExec role in report server catalog db and temp db.|||It looks like Network Service account is not allowed to set parameters. I am not sure what is the mininum permission set. Can you try adding the account as a content manager to the home folder?|||If I right-click in design view in VS2005, the report runs fine. It doesn't work when I try to run in a browser and is being served up by my dev IIS server.|||I have added the NetworkService as administrator and still no go.|||That did it. Was confused in the ReportManager. Simple fix. Seems like lots of people having same problem. Thank you for your help|||Sorry--Don't follow what the fix was. What did it?|||

    Went into Report Manager and gave NT Authority\NetworkService the necessary role assignments.

    |||Thanks--got past that one, now I get to deal with the database access permissions lol...
  • rsAccessDenied

    I have a reportViewer control on a webform. In my partial class I set the report path, server and parameters in the Page_Load. When I run the report I get this error:

  • The permissions granted to user 'NT AUTHORITY\NETWORK SERVICE' are insufficient for performing this operation. (rsAccessDenied)

    Here is my code:

    Dim u As New UriTypeConverter
    Dim ReportParameters(0) As ReportParameter


    ReportParameters(0) = New ReportParameter("ProjectKey", 262)
    rv.ShowParameterPrompts = False
    rv.ServerReport.ReportServerUrl = u.ConvertFromString("http://localhost/ReportServer/")
    rv.ServerReport.ReportPath = "/Test/Duplicate_MIU_Report"
    rv.ServerReport.SetParameters(ReportParameters)

    Have you properly granted permission for your web user? Go to the configuration tool, and look for any red X on the left hand side. Open the "Web service identity" and make sure your web user is 'NT AUTHORITY\NETWORK SERVICE". Then go to "Database Setup" panel. I think you are using "Service Credentials". Reapply the settings may fix your problem.|||

    I have NT AUTHORITY\NetworkService as the service account (it is grayed out so it is not possible to change), and I have Service Credentials as the credentials type in the database setup. There are no red X's. Still get the same error.

    In addition, I get this DCOM error in the system log:

    The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID

    {BA126AD1-2166-11D1-B1D0-00805FC1270E}

    to the user NT AUTHORITY\NETWORK SERVICE SID (S-1-5-20). This security permission can be modified using the Component Services administrative tool.

    I'm not exactly sure what and how to do in Component Services admin tool.

    |||

    This thread may help you with the DCOM error:

    http://forums.microsoft.com/MSDN/showpost.aspx?postid=258889&siteid=1

    |||Netman has both local activation AND execution|||Do you see Network Services part of RSExec role in your report server catalog db and temp db?|||Yes|||Yes, Network Services is RSExec role in report server catalog db and temp db.|||It looks like Network Service account is not allowed to set parameters. I am not sure what is the mininum permission set. Can you try adding the account as a content manager to the home folder?|||If I right-click in design view in VS2005, the report runs fine. It doesn't work when I try to run in a browser and is being served up by my dev IIS server.|||I have added the NetworkService as administrator and still no go.|||That did it. Was confused in the ReportManager. Simple fix. Seems like lots of people having same problem. Thank you for your help|||Sorry--Don't follow what the fix was. What did it?|||

    Went into Report Manager and gave NT Authority\NetworkService the necessary role assignments.

    |||Thanks--got past that one, now I get to deal with the database access permissions lol...
  • Saturday, February 25, 2012

    RS 2005: Use a Custom Class as DataSource?

    Hi,
    Is it possible to use a Custom Class/Object as a DataSource/DataSet for a
    report?
    I have now for instance my object MyCompany, and it woudl be nice to just
    use a MyCompany-instance as the DataSource...
    Any hints/help woudl be really appreciated,
    Thanks a lot in advance,
    PieterI thought that the objectDatasource control was only used by ASP.NET
    applications.
    A SSRS report is not an ASP.NET application unless you use the new
    reportViewer component and there you can use an ObjectDataSource
    Med bouchenafa
    "Pieter" <pietercoucke@.hotmail.com> a écrit dans le message de news:
    %23w1cPSlIGHA.668@.TK2MSFTNGP11.phx.gbl...
    > Hi,
    > Is it possible to use a Custom Class/Object as a DataSource/DataSet for a
    > report?
    > I have now for instance my object MyCompany, and it woudl be nice to just
    > use a MyCompany-instance as the DataSource...
    > Any hints/help woudl be really appreciated,
    > Thanks a lot in advance,
    > Pieter
    >|||Hi,
    You can bind windows applications to objects also.
    Ken
    --
    "Med Bouchenafa" <com.hotmail@.bouchenafa> wrote in message
    news:OhXZe$lIGHA.2896@.TK2MSFTNGP09.phx.gbl...
    >I thought that the objectDatasource control was only used by ASP.NET
    >applications.
    > A SSRS report is not an ASP.NET application unless you use the new
    > reportViewer component and there you can use an ObjectDataSource
    > Med bouchenafa
    > "Pieter" <pietercoucke@.hotmail.com> a écrit dans le message de news:
    > %23w1cPSlIGHA.668@.TK2MSFTNGP11.phx.gbl...
    >> Hi,
    >> Is it possible to use a Custom Class/Object as a DataSource/DataSet for a
    >> report?
    >> I have now for instance my object MyCompany, and it woudl be nice to just
    >> use a MyCompany-instance as the DataSource...
    >> Any hints/help woudl be really appreciated,
    >> Thanks a lot in advance,
    >> Pieter
    >|||That's right, my mistake
    I should have said applications and not only ASP.NET applications
    I meant a SSRS report is a standalone xml file
    Thanks for correcting
    Med bouchenafa
    "Ken Tucker [MVP]" <vb2ae@.bellsouth.net> a écrit dans le message de news:
    OPOUq3mIGHA.1180@.TK2MSFTNGP09.phx.gbl...
    > Hi,
    > You can bind windows applications to objects also.
    > Ken
    > --
    > "Med Bouchenafa" <com.hotmail@.bouchenafa> wrote in message
    > news:OhXZe$lIGHA.2896@.TK2MSFTNGP09.phx.gbl...
    >>I thought that the objectDatasource control was only used by ASP.NET
    >>applications.
    >> A SSRS report is not an ASP.NET application unless you use the new
    >> reportViewer component and there you can use an ObjectDataSource
    >> Med bouchenafa
    >> "Pieter" <pietercoucke@.hotmail.com> a écrit dans le message de news:
    >> %23w1cPSlIGHA.668@.TK2MSFTNGP11.phx.gbl...
    >> Hi,
    >> Is it possible to use a Custom Class/Object as a DataSource/DataSet for
    >> a report?
    >> I have now for instance my object MyCompany, and it woudl be nice to
    >> just use a MyCompany-instance as the DataSource...
    >> Any hints/help woudl be really appreciated,
    >> Thanks a lot in advance,
    >> Pieter
    >>
    >|||Ok thanks, but how do I have to do it? I can't find any information about
    it?
    How do I tell my report (when designing it) that it has to use property's of
    a certain class? and how can I give an instance of that class as a parameter
    before refreshing the reportviewer?
    "Med Bouchenafa" <com.hotmail@.bouchenafa> wrote in message
    news:ubgLk$oIGHA.3492@.TK2MSFTNGP09.phx.gbl...
    > That's right, my mistake
    > I should have said applications and not only ASP.NET applications
    > I meant a SSRS report is a standalone xml file
    > Thanks for correcting
    > Med bouchenafa
    > "Ken Tucker [MVP]" <vb2ae@.bellsouth.net> a écrit dans le message de news:
    > OPOUq3mIGHA.1180@.TK2MSFTNGP09.phx.gbl...
    >> Hi,
    >> You can bind windows applications to objects also.
    >> Ken
    >> --
    >> "Med Bouchenafa" <com.hotmail@.bouchenafa> wrote in message
    >> news:OhXZe$lIGHA.2896@.TK2MSFTNGP09.phx.gbl...
    >>I thought that the objectDatasource control was only used by ASP.NET
    >>applications.
    >> A SSRS report is not an ASP.NET application unless you use the new
    >> reportViewer component and there you can use an ObjectDataSource
    >> Med bouchenafa
    >> "Pieter" <pietercoucke@.hotmail.com> a écrit dans le message de news:
    >> %23w1cPSlIGHA.668@.TK2MSFTNGP11.phx.gbl...
    >> Hi,
    >> Is it possible to use a Custom Class/Object as a DataSource/DataSet for
    >> a report?
    >> I have now for instance my object MyCompany, and it woudl be nice to
    >> just use a MyCompany-instance as the DataSource...
    >> Any hints/help woudl be really appreciated,
    >> Thanks a lot in advance,
    >> Pieter
    >>
    >>
    >