473,508 Members | 2,274 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sessions and Crystal Reports

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
5 2227
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
19130
by: Stephan | last post by:
Hi, I'm using Visual Studio 2003 (C#) with the integrated Crystal Report software and have the following question: How can I assign a value (string) to an unbound (string) field in Crystal...
5
2996
by: BStorm | last post by:
I have a transaction log file where the DataSet table's Description column is actually delimited into "subcolumns" based upon the transaction id. I would like to parse these into separate fields...
3
6885
by: Gheaci Maschl | last post by:
Hi all! I would like to have your opinion about my problem and my proposal how to solve it: Ingredients: - BTriev database - Crystal Reports - maybe MS Access - Liinos6 (small ERP software)
7
4979
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
0
2320
by: Robert Warnestam | last post by:
Hello, I have some problems deploying Crystal Reports. I'm using Visual Studio 2005 Beta 1. In this version Crystal Reports (9.7.3500.0) is included. I created a small test application...
3
8909
by: VMI | last post by:
I know this may not be the best NG for this, but I feel you guys know more about this than any of the other NGs. I need to build several simple reports (over 50 of them and they get their data...
1
4300
by: Lyners | last post by:
Hello all, I have created an ASP.NET website that uses Crystal Reports that works on the localhost (my PC), but when I copy it to the server it does not. The problem is...
3
3798
by: Miro | last post by:
Hi, Just wondering what a good book is on visual studios 2008 ( or 2005 if no 2008 ) that teaches you how to properly use crystal reports with it. Or im assuming that as long as I can create a...
1
8119
by: =?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?= | last post by:
On reflection, you could possibly make the app a self extracting zip file which extracts the EXE and a settings file and then starts the app, then when you app closes, it can repack the settings...
0
7229
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7333
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7398
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7061
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5637
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5057
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4716
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3208
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1566
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.