Rank: Newbie
Groups: Registered
Joined: 8/18/2021(UTC) Posts: 1 Location: Johannesburg
|
Hi,
So I'm trying to override an existing sql query using the pre-load script feature by passing in another query with custom variables passed in through restrictions, now I'm not getting any errors but for some reason no data is being retrieved/shown in the view
1. I'm trying to replace '${ID}' with a restriction value
DECLARE @CompanyId UNIQUEIDENTIFIER = '${ID}'
2. The imports being used:
@using System.Data @using Seal.Model @using Seal.Helpers @{ ReportModel model = Model; ReportExecutionLog log = model.Report; List<ReportElement> elements = model.Elements; List<ReportRestriction> restrictions = model.Restrictions;
3. The code I used:
if (model.Source.Report != null) { ReportRestriction restrictionCompany = restrictions[0]; sql = sql.Replace("${ID}", restrictionCompany.Value2);
}
@Raw(sql)
If you can see what I'm doing wrong or can advise further it would be much appreciated
Thanks
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
|
|
|
|
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.