How can I get the sessionID for a particular execution. I know the report
server automatically generates a sessionID for each execution, but I need to
grab tht as I use that in my processing of stored procedures.
ThanksIf you render the report by SOAP, the SessionID will be exposed as property
of the RS Web service proxy (rs.SessionHeaderValue.SessionId). Look at the
code example for ReportingService.Render method in BOL.
--
Hope this helps.
----
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
----
"NI" <NI@.discussions.microsoft.com> wrote in message
news:14649E15-AD50-4AA6-A635-F1C00B3A31E2@.microsoft.com...
> How can I get the sessionID for a particular execution. I know the report
> server automatically generates a sessionID for each execution, but I need
to
> grab tht as I use that in my processing of stored procedures.
> Thanks|||Grab it from where? From inside your report? The session id is passed as a
session cookie to the browser and ping-pongs between the browser and the
server with each request.
For example, you do some tracing between the browser and the Report Server
when a report is requested by URL, you will see something like:
/<folderpath>/<reportname>=vazffvza1iojxlbtqp4nwged
In my case, vazffvza1iojxlbtqp4nwged is the session id. If you need to get
from inside your report try to parse the HttpContext.Current to get to the
cookie value
--
Hope this helps.
----
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
----
"NI" <NI@.discussions.microsoft.com> wrote in message
news:64288C18-CF50-43A9-B8FA-331557612F41@.microsoft.com...
> Teo:
> I just use the reporting services just as it comes out of the box. All my
> report generation is through the report manager(and not through web
service
> access). In this situation how can I grab a sessionID?
> Thanks
> "Teo Lachev" wrote:
> > If you render the report by SOAP, the SessionID will be exposed as
property
> > of the RS Web service proxy (rs.SessionHeaderValue.SessionId). Look at
the
> > code example for ReportingService.Render method in BOL.
> >
> > --
> > Hope this helps.
> >
> > ----
> > Teo Lachev, MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > Publisher website: http://www.manning.com/lachev
> > Buy it from Amazon.com: http://shrinkster.com/eq
> > Home page and blog: http://www.prologika.com/
> > ----
> >
> > "NI" <NI@.discussions.microsoft.com> wrote in message
> > news:14649E15-AD50-4AA6-A635-F1C00B3A31E2@.microsoft.com...
> > > How can I get the sessionID for a particular execution. I know the
report
> > > server automatically generates a sessionID for each execution, but I
need
> > to
> > > grab tht as I use that in my processing of stored procedures.
> > >
> > > Thanks
> >
> >
> >|||Let's back up a little. You say that you are passing the session id to your
stored procedure. What is it that you are using the session id for? If what
you want to know is who is running the report then you can pass the global
variable user!userid to the stored procedure.
It would seem to me that the sessionid will mean nothing outside of RS.
Bruce L-C
"NI" <NI@.discussions.microsoft.com> wrote in message
news:2268528A-FA6E-40E2-AF2F-4A6371E1ACBC@.microsoft.com...
> Maybe am missing something here, but how can I use HttpContext.Current
when
> all i have is a bunch of rdl files. I DO NOT have any classic ASP.NEt
pages.
> I just have a few rdl files deployed on my report manager.
> when i go to the reportmanager, and browse thru a few folders and get to
my
> report (report1.rdl)
> http://localhost/reports/(sessiondID)/<report folder>...
> Before I select my parameters and click view report, I need to get this
> sessionID and send it to a stored procedure.
> Thanks. Really appreciate the help
>
> "Teo Lachev" wrote:
> > Grab it from where? From inside your report? The session id is passed as
a
> > session cookie to the browser and ping-pongs between the browser and the
> > server with each request.
> >
> > For example, you do some tracing between the browser and the Report
Server
> > when a report is requested by URL, you will see something like:
> >
> > /<folderpath>/<reportname>=vazffvza1iojxlbtqp4nwged
> >
> > In my case, vazffvza1iojxlbtqp4nwged is the session id. If you need to
get
> > from inside your report try to parse the HttpContext.Current to get to
the
> > cookie value
> >
> > --
> > Hope this helps.
> >
> > ----
> > Teo Lachev, MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > Publisher website: http://www.manning.com/lachev
> > Buy it from Amazon.com: http://shrinkster.com/eq
> > Home page and blog: http://www.prologika.com/
> > ----
> >
> > "NI" <NI@.discussions.microsoft.com> wrote in message
> > news:64288C18-CF50-43A9-B8FA-331557612F41@.microsoft.com...
> > > Teo:
> > >
> > > I just use the reporting services just as it comes out of the box. All
my
> > > report generation is through the report manager(and not through web
> > service
> > > access). In this situation how can I grab a sessionID?
> > >
> > > Thanks
> > >
> > > "Teo Lachev" wrote:
> > >
> > > > If you render the report by SOAP, the SessionID will be exposed as
> > property
> > > > of the RS Web service proxy (rs.SessionHeaderValue.SessionId). Look
at
> > the
> > > > code example for ReportingService.Render method in BOL.
> > > >
> > > > --
> > > > Hope this helps.
> > > >
> > > > ----
> > > > Teo Lachev, MCSD, MCT
> > > > Author: "Microsoft Reporting Services in Action"
> > > > Publisher website: http://www.manning.com/lachev
> > > > Buy it from Amazon.com: http://shrinkster.com/eq
> > > > Home page and blog: http://www.prologika.com/
> > > > ----
> > > >
> > > > "NI" <NI@.discussions.microsoft.com> wrote in message
> > > > news:14649E15-AD50-4AA6-A635-F1C00B3A31E2@.microsoft.com...
> > > > > How can I get the sessionID for a particular execution. I know the
> > report
> > > > > server automatically generates a sessionID for each execution, but
I
> > need
> > > > to
> > > > > grab tht as I use that in my processing of stored procedures.
> > > > >
> > > > > Thanks
> > > >
> > > >
> > > >
> >
> >
> >|||OK, think of the Report Server is just a web-based application. In your
report you can call custom code located inside your report or in an external
.NET assembly. There, you can get to HttpContect.Current.
Of course, this is not going to work when testing your report within the
Report Designer. So, you need to check if HttpContext.Current is null and,
if yes, default to a dummy session id.
--
Hope this helps.
----
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
----
"NI" <NI@.discussions.microsoft.com> wrote in message
news:2268528A-FA6E-40E2-AF2F-4A6371E1ACBC@.microsoft.com...
> Maybe am missing something here, but how can I use HttpContext.Current
when
> all i have is a bunch of rdl files. I DO NOT have any classic ASP.NEt
pages.
> I just have a few rdl files deployed on my report manager.
> when i go to the reportmanager, and browse thru a few folders and get to
my
> report (report1.rdl)
> http://localhost/reports/(sessiondID)/<report folder>...
> Before I select my parameters and click view report, I need to get this
> sessionID and send it to a stored procedure.
> Thanks. Really appreciate the help
>
> "Teo Lachev" wrote:
> > Grab it from where? From inside your report? The session id is passed as
a
> > session cookie to the browser and ping-pongs between the browser and the
> > server with each request.
> >
> > For example, you do some tracing between the browser and the Report
Server
> > when a report is requested by URL, you will see something like:
> >
> > /<folderpath>/<reportname>=vazffvza1iojxlbtqp4nwged
> >
> > In my case, vazffvza1iojxlbtqp4nwged is the session id. If you need to
get
> > from inside your report try to parse the HttpContext.Current to get to
the
> > cookie value
> >
> > --
> > Hope this helps.
> >
> > ----
> > Teo Lachev, MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > Publisher website: http://www.manning.com/lachev
> > Buy it from Amazon.com: http://shrinkster.com/eq
> > Home page and blog: http://www.prologika.com/
> > ----
> >
> > "NI" <NI@.discussions.microsoft.com> wrote in message
> > news:64288C18-CF50-43A9-B8FA-331557612F41@.microsoft.com...
> > > Teo:
> > >
> > > I just use the reporting services just as it comes out of the box. All
my
> > > report generation is through the report manager(and not through web
> > service
> > > access). In this situation how can I grab a sessionID?
> > >
> > > Thanks
> > >
> > > "Teo Lachev" wrote:
> > >
> > > > If you render the report by SOAP, the SessionID will be exposed as
> > property
> > > > of the RS Web service proxy (rs.SessionHeaderValue.SessionId). Look
at
> > the
> > > > code example for ReportingService.Render method in BOL.
> > > >
> > > > --
> > > > Hope this helps.
> > > >
> > > > ----
> > > > Teo Lachev, MCSD, MCT
> > > > Author: "Microsoft Reporting Services in Action"
> > > > Publisher website: http://www.manning.com/lachev
> > > > Buy it from Amazon.com: http://shrinkster.com/eq
> > > > Home page and blog: http://www.prologika.com/
> > > > ----
> > > >
> > > > "NI" <NI@.discussions.microsoft.com> wrote in message
> > > > news:14649E15-AD50-4AA6-A635-F1C00B3A31E2@.microsoft.com...
> > > > > How can I get the sessionID for a particular execution. I know the
> > report
> > > > > server automatically generates a sessionID for each execution, but
I
> > need
> > > > to
> > > > > grab tht as I use that in my processing of stored procedures.
> > > > >
> > > > > Thanks
> > > >
> > > >
> > > >
> >
> >
> >
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment