views:

146

answers:

2

Hello all. I got a little issue here. I got an ASP.net Page that display a Report. I need to display that report in a new page.

I'm thinking in passing the DataSet as a Session Variable but I don't Know if it is a good Idea. What do you think?

+1  A: 

You could put the DataSet in a Session Variable. Depending on the parameters of the Report, you could also put those parameters values in Session variables and let the new page do the work.

If you have no parameters for the Report, then you can just load the report from the new page and not put anything in the Session.

Eclipsed4utoo
I need to pass some parameters to the report.
GutierrezDev
You could pass those as POST variables or as session variables... With POS variables, you don't need to worry about cleaning them up... Just remember, the more you have in session, the more RAM is required on the server. It's all about trade-offs.
David Stratton
However, this suggestion isn't bad so I'm voting it up.
David Stratton
I was looking the code but passing by POST is not workable idea for me. I need to pass a dataset so POST wont work.
GutierrezDev
+1  A: 

Depending on the size of the dataset, you may run into problems. Unless there is a compelling reason, I would just re-query the data in the new page.

But, if there is a compelling reason (such as performance) and the size of the dataset is not too large, you can pass it. You might consider removing it from the session after the report is bound to it, though.

David Stratton