Crystal Reports: Display data according to session

W

weird0

I am trying to display a crystal report in .aspx page. I created a
dataset for that but i wrote the query:

SELECT atm_amount,atm_branch,atm_date,balance
FROM ATM_Transactions
WHERE user_id=Session["UserId"].ToCharArray()

But this query does not work....
I dont have much knowledge how to maintain sessions.

I want, that when the user opens the page, his userid will compared
with sessionid that 1=1
and after matching the report is displayed.

How can i achieve my goal and can someone teach me in simple steps
how to create a crystal report..........?

I have been trying this shet for months....
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

weird0 said:
I am trying to display a crystal report in .aspx page. I created a
dataset for that but i wrote the query:

SELECT atm_amount,atm_branch,atm_date,balance
FROM ATM_Transactions
WHERE user_id=Session["UserId"].ToCharArray()

But this query does not work....

I bet it does not.

Why are you converting it to char array?

DO you have anything in session in the first place?
 
W

weird0

Hi,


I am trying to display a crystal report in .aspx page. I created a
dataset for that but i wrote the query:
SELECT atm_amount,atm_branch,atm_date,balance
FROM ATM_Transactions
WHERE user_id=Session["UserId"].ToCharArray()
But this query does not work....

I bet it does not.

Why are you converting it to char array?

DO you have anything in session in the first place?

A question for a question is not a good reply...............

Session["UserId"].ToString() contains 1 so its filled up....

i am converting it to char array coz user_id field is of the data type
nchar(10)

so i can compare the two fields..........

can u tell me an alternative way or the correct way of what i am
trying to achieve as you must have guessed.........

my msn id is (e-mail address removed)

need loads of help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top