Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 23, 2012 01:37 PM by Gindy39
Feb 21, 2012 04:39 PM|LINK
Good day community,
My situation is the following. On this web page I have a Tab container with 6 tab. Out of those 6 tabs 2 of them use the same user control but are filled with different data. Since both are the same, both have a PRINT button. When click I call for a report
made on reporting services. What I'm having a hard time is, how to tell the report where the data is coming from , since this is a parameter for the report. One tab is for past information the other is for current information, so if the data came from the
PAST tab I want the report to know that the parameter @TYPE = 1 and when it comes from the Current tab, parameter @TYPE =2.
I tried using a session variable for this but it doesn't work since both tabs open when the tab container is laoded so the latest one in the code will prevail, hence all reports no matter where you select to print will yield the current data , since it loads
after the Past data. How can I tell the report which type he is supost to use for the report?
Also, I think there might be a better way to do this without using session variable. This is a big company and the application is overuse, and having more resources used, having that session variable always there might not be the best choice, performance
wise. But I don't know any other approach so any help your be great
Thank you in advance
Feb 22, 2012 02:58 AM|LINK
put up a property in usercontrol and set that one in designer...and set this property differently for different instances of user controls, i mean to say different for tab2 ans tab6, then on button click, you can get to know on which tab you are there and
generate that report...
designer property of user control - http://www.c-sharpcorner.com/UploadFile/Ashish1/usercontrol01272006104019AM/usercontrol.aspx
Feb 23, 2012 01:37 PM|LINK
Yes this is what I ended up doing and works like a charm