By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,156 Members | 962 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,156 IT Pros & Developers. It's quick & easy.

Sessions and Crystal Reports

P: n/a
I'm asking this on the off chance that someone out there might have
seenit before.

In my current application, when the user logs in, the state variable
called "role" is assigned to them, detailing what they can do and what
they cannot do. This variable follows them through the entire
application (It is assigned using Session("role") = "xxx").

Problem is, when I run a crystal reports RPT file, I lose the session
variable - it reverts to being equal to "", rather than "ADMIN" or some
such thing. I can track this throughout the app and i know for a fact
that it happens as soon as a RPT file is run... Has anyone else seen
something like this before?

Jun 29 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
On 29 Jun 2006 09:41:16 -0700, "furby" <Wo*******@gmail.com> wrote:
I'm asking this on the off chance that someone out there might have
seenit before.

In my current application, when the user logs in, the state variable
called "role" is assigned to them, detailing what they can do and what
they cannot do. This variable follows them through the entire
application (It is assigned using Session("role") = "xxx").

Problem is, when I run a crystal reports RPT file, I lose the session
variable - it reverts to being equal to "", rather than "ADMIN" or some
such thing. I can track this throughout the app and i know for a fact
that it happens as soon as a RPT file is run... Has anyone else seen
something like this before?

How are you calling the Report?...Perhaps a new session is created..

Jun 29 '06 #2

P: n/a
The ASP code does a redirect to a address that is that particular
report. Something like 'Response.redirect "Report.rpt"'.

Turkbear wrote:
On 29 Jun 2006 09:41:16 -0700, "furby" <Wo*******@gmail.com> wrote:
I'm asking this on the off chance that someone out there might have
seenit before.

In my current application, when the user logs in, the state variable
called "role" is assigned to them, detailing what they can do and what
they cannot do. This variable follows them through the entire
application (It is assigned using Session("role") = "xxx").

Problem is, when I run a crystal reports RPT file, I lose the session
variable - it reverts to being equal to "", rather than "ADMIN" or some
such thing. I can track this throughout the app and i know for a fact
that it happens as soon as a RPT file is run... Has anyone else seen
something like this before?

How are you calling the Report?...Perhaps a new session is created..


Jun 29 '06 #3

P: n/a
On 29 Jun 2006 10:37:13 -0700, "furby" <Wo*******@gmail.com> wrote:
The ASP code does a redirect to a address that is that particular
report. Something like 'Response.redirect "Report.rpt"'.

Turkbear wrote:
On 29 Jun 2006 09:41:16 -0700, "furby" <Wo*******@gmail.com> wrote:
>I'm asking this on the off chance that someone out there might have
>seenit before.
>
>In my current application, when the user logs in, the state variable
>called "role" is assigned to them, detailing what they can do and what
>they cannot do. This variable follows them through the entire
>application (It is assigned using Session("role") = "xxx").
>
>Problem is, when I run a crystal reports RPT file, I lose the session
>variable - it reverts to being equal to "", rather than "ADMIN" or some
>such thing. I can track this throughout the app and i know for a fact
>that it happens as soon as a RPT file is run... Has anyone else seen
>something like this before?

How are you calling the Report?...Perhaps a new session is created..


Probably more like
Response.Redirect{"/virtual_dir/Report.rpt")

I believe the redirect creates/starts a new session ( depending, maybe, on where the new location is in relation to the
sending one) so you would need to pass the Session Variable needed in the redirect and read it there - assuming you need
it there...

How does the app 'get back' from the redirect?
Jun 29 '06 #4

P: n/a
The way this app is set up (I don't particularly care for it, but I
sort of inherited it) is this :

The user comes to a page called "Report_criteria.asp", which is
displayed in an Iframe. when the user clicks on a report, the results
dislplay in a separate window (Through the use of a "target='_Blank'"
in the form that submits it). The reason the page is using a redirect
is because the user can select any of a number of reports.

Problem is, I'm using a session variable in the app that is called
"Role" to decide what combination of links to show accross the top of
each page as each separate role has a certain subset of those links.

I don't use the session variable in the report at all and the user
never "Get's back" from the report - they simply close out the window
it displays in.

But, the fun thing is that I can track the session("Role") variable. It
holds true until I run the rpt file, then it loses it - essentially
leaving the user with nothing to do beyond the links that everybody
gets - in other words, they go from being an admin user to being a
nothing user, in one fell swoop. And this doesn't happen anywhere else
in the app - only when the user invokes a crystal reports rpt file,
does the session get lost.

I'm starting to wonder if maybe there is some sort of bug in crystal
reports that destroys session variables in ASP apps. I've tried
tracking other session variables and they are also lost at the same
time. I also tried naming the session variables something else (Tried
"RoleVar", "VarRole", "Admin", "AdminRole", and so on) and they all get
lost in the same way - every time I run a crystal reports report. Also,
this happens when I run ANY Crystal RPT file - not just this one....

It's just really really weird - I have never seen this happen before....

Jun 29 '06 #5

P: n/a
On 29 Jun 2006 13:12:48 -0700, "furby" <Wo*******@gmail.com> wrote:

I'm starting to wonder if maybe there is some sort of bug in crystal
reports that destroys session variables in ASP apps. I've tried
tracking other session variables and they are also lost at the same
time. I also tried naming the session variables something else (Tried
"RoleVar", "VarRole", "Admin", "AdminRole", and so on) and they all get
lost in the same way - every time I run a crystal reports report. Also,
this happens when I run ANY Crystal RPT file - not just this one....

It's just really really weird - I have never seen this happen before....


Well, that method of calling a Crystal report is not a supported one anymore but I doubt it is a bug..
We use session variables in our asp pages that call Crystal ( the modern way, with COM objects in asp pages or having
them published to Enterprise or Crystal Report Server) and they are persistant..

The fact the ALL your session variables are lost indicates to me that the session that set them has been
abandoned...without seeing the exact code used in calling the report, I do not know where/why that would be happening..

Sorry I can;t be of more help..Try one of the great Crystal-Related forums in www.tek-tips.com - many experienced
'real-world' users there provide very good solutions..Someone may have had the exact problem..

Jun 29 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.