toggle on Textbox not working
I have a simple report that has tablix with two lines and a text box that should toggle show and hide on the tablix, I'm rendering the report in a reportviewer control as a local report on a aspx page. When I first display the report it displays with the - sign by the textbox and the table is visible, when I click the toggle (- sign) the page does a postback but the state of the toggle doesn't change (it stays a -) and the table stays visible. What am I missing?
July 12th, 2012 2:55pm

Hi Patrick, If you have not checked for the postback event as below, try setting this and put the code inside it.. protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { // Get report path from configuration file ReportViewer1.ServerReport.ReportServerUrl = new Uri(ConfigurationManager.AppSettings["ReportServerUrl"]); - Chintak (My Blog)
Free Windows Admin Tool Kit Click here and download it now
July 12th, 2012 3:22pm

Thanks for your replay, I forgot to but in my post but this is a local report it is not running on a server
July 12th, 2012 3:28pm

Hi Patrick, If you want the initial state collapsed, then select Hide in the tablix visibilty properties. Then + sign will come and tablix is hidden on initial report display. When expanded you can see the Tablix. If you want the initial state expanded, then select Show in the tablix visibilty properties and then on Textbox1 properties - IntialToggleState set as True. Then - sign will come and tablix is expanded on initial report display.
Free Windows Admin Tool Kit Click here and download it now
July 12th, 2012 4:47pm

Thanks for your replay...but the problem is that the state of the toggle is not changing when I click it it is always showing a - and the tablix is never being hidden even though I click the - and the report does a postback
July 12th, 2012 4:51pm

Hello Patrick, Thank you to post your question on TechNet forum. I want to check whether you still have the problem. If you still have this issue, I suggest you try to move the report configuration settings in code to if (!IsPostBack) condition, like Chintak mentioned before. It will avoid the reset the report in post back. If you still encounter the error, please post out the code segment in aspx file and code behind file about this issue. I hope it is useful to you. Regards, EdwardEdward Zhu TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
August 4th, 2012 6:50am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics