Another Designer Problem

Stimulsoft Reports.WEB discussion
Post Reply
smlemmon
Posts: 3
Joined: Sat Apr 10, 2010 6:06 am
Location: UK

Another Designer Problem

Post by smlemmon »

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
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Another Designer Problem

Post by Andrew »

Dear Simon,

1. Session and ViewState are deleted, because Flash application has no ability to work with them, and, when saving, WebDesigner always opens new session.

2. The Page_Load event cannot be called because a browser, instead of request to server, take the specified page from cache. There is a workaround for this, for example, specifying in the ExitUrl parameter other page in what the redirect to the required page will be contained. This way will allow clearing browser cache for the page and the Page_Load event will be called.

3. Unfortunately, there are no special hidden serialized fields for users in a report. You may use the Variables collection, and also store parameters in the server cache or to pass to Url as QueryString.

Thank you.
MikeD
Posts: 86
Joined: Fri Feb 12, 2010 4:23 pm
Location: USA

Another Designer Problem

Post by MikeD »


I save our reports in a database.

The record in our database is the following

int Report id
string Report Name
string Report Display Name
string Report Description
byte[] Report

The actual report is stored in the last field in a byte array.
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Another Designer Problem

Post by Andrew »

Hello MikeD,

It seems that your post should have been posted to another forum thread. Please confirm this.

Thank you.
Post Reply