Hi!
I have a template which is loaded at the startup, this one has 2 variables "From" and "To2 (each is a datetime).
I´m overwriting this variables to Today and Yesterday:
report["From"] = DateTime.Today.AddDays(-1);
report["To"] = DateTime.Now;
And also setting a ID-Collection for my SQL-Query:
report["Ids"] = App.UserData.SelectedIDs; //Is a List
But if i click on preview, i see the DateTime Pickers but the old datetime is selected (which is stored in the mrt file).
The same appears if i send a RenderRequest to the WCF Service. The Services gets the old values not the overwritten ones ?
Would be glad to read a solution for this problem as quick as possible.
Greets
Christian
Edit: I use the latest Build of last week.
Silverlight - Overwriting Variables takes no effect
-
- Posts: 7
- Joined: Tue Feb 14, 2012 5:05 am
- Location: Vienna
Silverlight - Overwriting Variables takes no effect
Hello, Christian.
report["From"] expression you could use after compiling report only.
Thank you.
Please, try to set variables value with next code:christian1989 wrote:I have a template which is loaded at the startup, this one has 2 variables "From" and "To2 (each is a datetime).
I´m overwriting this variables to Today and Yesterday:
report["From"] = DateTime.Today.AddDays(-1);
report["To"] = DateTime.Now;
And also setting a ID-Collection for my SQL-Query:
report["Ids"] = App.UserData.SelectedIDs; //Is a List
But if i click on preview, i see the DateTime Pickers but the old datetime is selected (which is stored in the mrt file).
The same appears if i send a RenderRequest to the WCF Service. The Services gets the old values not the overwritten ones ?
Would be glad to read a solution for this problem as quick as possible.
Code: Select all
report.Dictionary.Variables["From"].ValueObject = DateTime.Today.AddDays(-1);
report.Dictionary.Variables["To"].ValueObject = DateTime.Now;
Thank you.
-
- Posts: 7
- Joined: Tue Feb 14, 2012 5:05 am
- Location: Vienna
Silverlight - Overwriting Variables takes no effect
Hi!
Thank you for your answer, now it works.
But i think i have found another bug.
I attach to the following event:
StiOptions.Silverlight.WCFService.WCFRenderReport += WCFRenderReport;
But if i create a new report (New --> Blank Report) in the designer and click on preview, the event is risen but the "object sender" argument is null (!!).
Another "bug"?
If i click on submit in the preview form (which sets the variables), the preview button and the input form is disappearing, i have to switch to the designer and afterwards again to preview to click again on "Submit" ?!
Thank you for your answer, now it works.
But i think i have found another bug.
I attach to the following event:
StiOptions.Silverlight.WCFService.WCFRenderReport += WCFRenderReport;
But if i create a new report (New --> Blank Report) in the designer and click on preview, the event is risen but the "object sender" argument is null (!!).
Another "bug"?
If i click on submit in the preview form (which sets the variables), the preview button and the input form is disappearing, i have to switch to the designer and afterwards again to preview to click again on "Submit" ?!
Silverlight - Overwriting Variables takes no effect
Hello.
Thank you.
We've fixed this problem, the patch will be available in our next prerelease build this week.christian1989 wrote:I attach to the following event:
StiOptions.Silverlight.WCFService.WCFRenderReport += WCFRenderReport;
But if i create a new report (New --> Blank Report) in the designer and click on preview, the event is risen but the "object sender" argument is null (!!).
We couldn't reproduce this issue. Could you describe it more detailed or send us a video with it.christian1989 wrote:If i click on submit in the preview form (which sets the variables), the preview button and the input form is disappearing, i have to switch to the designer and afterwards again to preview to click again on "Submit" ?!
Thank you.