Another Designer Problem
Posted: Sat Apr 10, 2010 10:20 am
Hi,
Sorry - and anotther small issue with the web designer.
On the webform that I have the Designer on, I need to store an Id which relates to the report so that I can save it in my database.
Option 1
Initially, I tried using both session and viewstate variables to store the value. I save the value to the variable before editing the report, and then when the save button is clicked on the designer, I read it back from the variable.
However, when I try and read the value back, it seems that something has removed the session item, so it is null.
I have checked everything very carefully, and it is definitely getting cleared (or is not available) during the save of the report in the designer.
Option 2
OK.. as a second option, I put my designer onto a seperate page and used a QueryString parameter into the page. This worked as I can read the QueryString parameter all the time.
I set the ExitUrl property in the designer to the page that actually opened the new report designer page and put a databind in the Page_Load event of the calling page so that changes to the report cna be seen in a grid on the page.
It seems that this ExitUrl doesnt seem to result in the Page_Load event of the calling page being called. The only way I could force it to hit the Page_Load event was to put some querystring parameter into the ExitUrl...
i.e. ReportAdministration.aspx?Databind=true.
Unfortunately, I cant do this for a few reasons that I wont go into.
I have also noticed that when I call StiWebDesigner.Design in the Page_Load event, I am getting an error "Server cannot clear headers after HTTP headers have been sent.". I tried calling the method in the Pre_Render event of the page, but still get the same error.
Out of the above, I have three questions...
1. Why is the session variable that I initialised prior to opening the desinger, then appear to be disposed when the Save Event is called in the designer.
2. Is there anyway to force the exit url to initialise a page load on the page that it is set to.
3. Is there another property of either the report or the designer in whcih I can store some sort of parameter that is persisted beween loading the report in the designer and saving it.
Many thanks in advance.
Regards
Simon
Sorry - and anotther small issue with the web designer.
On the webform that I have the Designer on, I need to store an Id which relates to the report so that I can save it in my database.
Option 1
Initially, I tried using both session and viewstate variables to store the value. I save the value to the variable before editing the report, and then when the save button is clicked on the designer, I read it back from the variable.
However, when I try and read the value back, it seems that something has removed the session item, so it is null.
I have checked everything very carefully, and it is definitely getting cleared (or is not available) during the save of the report in the designer.
Option 2
OK.. as a second option, I put my designer onto a seperate page and used a QueryString parameter into the page. This worked as I can read the QueryString parameter all the time.
I set the ExitUrl property in the designer to the page that actually opened the new report designer page and put a databind in the Page_Load event of the calling page so that changes to the report cna be seen in a grid on the page.
It seems that this ExitUrl doesnt seem to result in the Page_Load event of the calling page being called. The only way I could force it to hit the Page_Load event was to put some querystring parameter into the ExitUrl...
i.e. ReportAdministration.aspx?Databind=true.
Unfortunately, I cant do this for a few reasons that I wont go into.
I have also noticed that when I call StiWebDesigner.Design in the Page_Load event, I am getting an error "Server cannot clear headers after HTTP headers have been sent.". I tried calling the method in the Pre_Render event of the page, but still get the same error.
Out of the above, I have three questions...
1. Why is the session variable that I initialised prior to opening the desinger, then appear to be disposed when the Save Event is called in the designer.
2. Is there anyway to force the exit url to initialise a page load on the page that it is set to.
3. Is there another property of either the report or the designer in whcih I can store some sort of parameter that is persisted beween loading the report in the designer and saving it.
Many thanks in advance.
Regards
Simon