473,226 Members | 1,319 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,226 software developers and data experts.

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 2211
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
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
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
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
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
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
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
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
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
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
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

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.