Seal Report Forum
»
General
»
General Discussions/Other
»
are razor scripts supported at the seal web server level
Rank: Member
Groups: Registered
Joined: 6/9/2017(UTC) Posts: 29 Thanks: 1 times
|
I need to convert localtime to utc time for any date parameters used by a report. This can be done from a pre-load script in the report designer. However we are using the Seal web server and pre-load scripts are not available in the web client. I would like to define a script at the table level in Seal Server Manager to alter any date restriction dates used to run any reports accessing this table. If this is not do-able is there a way to update the date values entered as parameters before a report is executed in a Seal Web Server environment.
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
Pre-load scripts are normally executed by the Web Report Server. But you can not edit them with the Web Report Designer (the interface is simple). Did you try to use the global 'Init Script' property: Server Manager -> Configuration -> Configure Server... -> Init Script You might do you job here.
|
|
|
|
Rank: Member
Groups: Registered
Joined: 6/9/2017(UTC) Posts: 29 Thanks: 1 times
|
The init script works great for restrictions before you run the report. I need to modify the date ( add utc offset ) after the reports has executed in the web server. Where is the best place to write a C# script to modify the report data after it's been loaded but before it's displayed.
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
Yes, you might be able to use the 'Pre Load Script' of your model. Did you consider to define the pre load script...using the init script, or do what you want for your report (e.g. always creating a task). Here is the sample of Init Script (define in Server Manager -> Configuration -> Configure Server...) to modify your models: Code:@using Seal.Model
@using System.Data
@{
Report report = Model;
ReportExecutionLog log = Model;
foreach (var model in report.Models) {
model.PreLoadScript = @"@using Seal.Model
....DO YOU WORK HERE
";
}
}
|
1 user thanked epf for this useful post.
|
|
|
Seal Report Forum
»
General
»
General Discussions/Other
»
are razor scripts supported at the seal web server level
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.