Wednesday, March 7, 2012

Problems with C# Sample to Print Reports

I am having permission problems with the sample report printing program from
Bryan Keller. (http://www.csharphelp.com/archives3/archive545.html)
The DefaultCredentials from the CredentialCache certainly has no data, and I
don't seem to be able to get valid data into the cache
Not sure about the relative path of the report either. I am running against
my own report, since I don't have the samples installed. I am using:
/Report Project1/118-2 as a path.
Don't know if that is correct, but that is what I see when I run it in the
browser. Except the '/' char turns into %2F, and the space into a '+'.
So it's %2FReport+Project1%2F118-2 in the browser.
Has anybody else tried this sample program with their own reports?
GerhardThe path of a report is relative to the root on the Report
Server.
So in the Report Manager if you see your report , lets say
report1 under the folder Report Project1 then the path of
your report is Report Project1/report1.
>--Original Message--
>I am having permission problems with the sample report
printing program from
>Bryan Keller.
(http://www.csharphelp.com/archives3/archive545.html)
>The DefaultCredentials from the CredentialCache certainly
has no data, and I
>don't seem to be able to get valid data into the cache
>Not sure about the relative path of the report either. I
am running against
>my own report, since I don't have the samples installed.
I am using:
>/Report Project1/118-2 as a path.
>Don't know if that is correct, but that is what I see
when I run it in the
>browser. Except the '/' char turns into %2F, and the
space into a '+'.
>So it's %2FReport+Project1%2F118-2 in the browser.
>Has anybody else tried this sample program with their own
reports?
>Gerhard
>
>.
>|||Ok, thanks, Ravi, that makes sense.
What about the DefaultCredentials? There are null strings for user/pw and
domain right now.
How do I get my domain credentials into the cache?
Gerhard
"Ravi" <anonymous@.discussions.microsoft.com> wrote in message
news:253e01c48e1e$c8cae640$a601280a@.phx.gbl...
> The path of a report is relative to the root on the Report
> Server.
> So in the Report Manager if you see your report , lets say
> report1 under the folder Report Project1 then the path of
> your report is Report Project1/report1.
> >--Original Message--
> >I am having permission problems with the sample report
> printing program from
> >Bryan Keller.
> (http://www.csharphelp.com/archives3/archive545.html)
> >
> >The DefaultCredentials from the CredentialCache certainly
> has no data, and I
> >don't seem to be able to get valid data into the cache
> >
> >Not sure about the relative path of the report either. I
> am running against
> >my own report, since I don't have the samples installed.
> I am using:
> >/Report Project1/118-2 as a path.
> >Don't know if that is correct, but that is what I see
> when I run it in the
> >browser. Except the '/' char turns into %2F, and the
> space into a '+'.
> >So it's %2FReport+Project1%2F118-2 in the browser.
> >
> >Has anybody else tried this sample program with their own
> reports?
> >
> >Gerhard
> >
> >
> >.
> >|||Ok, got the path and credentials problem solved. I can elaborated if it
will help others.
Path is: /folder/report
Credentials is: rs.Credentials = new
NetworkCredential("user","pw","domain")
DefaultCredentials may work if you're on a Lan, I'm on a VPN.
But now the question is: How do I pass parameters, as part of the URL? And
syntax?
Yeah I know, I'm a pain. <g> Sorry, this is all hitting me a little fast
too.
Gerhard
"Ravi" <anonymous@.discussions.microsoft.com> wrote in message
news:253e01c48e1e$c8cae640$a601280a@.phx.gbl...
> The path of a report is relative to the root on the Report
> Server.
> So in the Report Manager if you see your report , lets say
> report1 under the folder Report Project1 then the path of
> your report is Report Project1/report1.
> >--Original Message--
> >I am having permission problems with the sample report
> printing program from
> >Bryan Keller.
> (http://www.csharphelp.com/archives3/archive545.html)
> >
> >The DefaultCredentials from the CredentialCache certainly
> has no data, and I
> >don't seem to be able to get valid data into the cache
> >
> >Not sure about the relative path of the report either. I
> am running against
> >my own report, since I don't have the samples installed.
> I am using:
> >/Report Project1/118-2 as a path.
> >Don't know if that is correct, but that is what I see
> when I run it in the
> >browser. Except the '/' char turns into %2F, and the
> space into a '+'.
> >So it's %2FReport+Project1%2F118-2 in the browser.
> >
> >Has anybody else tried this sample program with their own
> reports?
> >
> >Gerhard
> >
> >
> >.
> >|||> Has anybody else tried this sample program with their own reports?
After making modifications for credencials I have used this code
successfully. Thursday I will try running it as a assembly from a web
page - we shall see. Looks good.
dlr
"Gerhard Paulman" <gerhardp@.inch.com> wrote in message
news:%23M$IbFejEHA.3428@.TK2MSFTNGP11.phx.gbl...
> I am having permission problems with the sample report printing program
from
> Bryan Keller. (http://www.csharphelp.com/archives3/archive545.html)
> The DefaultCredentials from the CredentialCache certainly has no data, and
I
> don't seem to be able to get valid data into the cache
> Not sure about the relative path of the report either. I am running
against
> my own report, since I don't have the samples installed. I am using:
> /Report Project1/118-2 as a path.
> Don't know if that is correct, but that is what I see when I run it in the
> browser. Except the '/' char turns into %2F, and the space into a '+'.
> So it's %2FReport+Project1%2F118-2 in the browser.
> Has anybody else tried this sample program with their own reports?
> Gerhard
>

No comments:

Post a Comment