I've tried this:
Pre sql statement of DataTable is like:
Code:CREATE TABLE #tempTable
(
CustomerID bigint,
CustomerName nvarchar(500),
City nvarchar(100),
InvoiceNumber nvarchar(100),
InvoiceDate date,
TotalAmount float,
PackingCharges float
)
INSERT into #tempTable
exec proc_OrderDetailsWithParameters
@city = 'CityName'
Sql statement is - SELECT * FROM #tempTable
This works fine. So, is there any way the value of parameter can be stored on a variable and use that variable in the pre sql statement, like
@city = model.GetRestrictionByName(...)
or something like that?
When i use @using Seal.Model in the Pre sql statement, the following error is shown :
Errors while compiling a Template.
Please try the following to solve the situation:
* If the problem is about missing/invalid references or multiple defines either try to load
the missing references manually (in the compiling appdomain!) or
Specify your references manually by providing your own IReferenceResolver implementation.
See
https://antaris.github.i...e/ReferenceResolver.html for details.
Currently all references have to be available as files!
* If you get 'class' does not contain a definition for 'member':
try another modelType (for example 'null' to make the model dynamic).
NOTE: You CANNOT use typeof(dynamic) to make the model dynamic!
Or try to use static instead of anonymous/dynamic types.
More details about the error:
- warning: (0, 0) The predefined type 'System.Collections.Generic.IReadOnlyList' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll'
- warning: (0, 0) The predefined type 'System.Collections.Generic.IReadOnlyCollection' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll'
- error: (40, 7) The name 'city' does not exist in the current context
I have also tried putting the pre load script of the model, which is quoted in post #11, into the pre sql statement of the table. Then the error is :
- warning: (0, 0) The predefined type 'System.Collections.Generic.IReadOnlyList' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll'
- warning: (0, 0) The predefined type 'System.Collections.Generic.IReadOnlyCollection' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll'
- error: (27, 26) Cannot implicitly convert type 'Seal.Model.MetaTable' to 'Seal.Model.ReportModel'Edited by user Wednesday, April 24, 2019 5:09:54 AM(UTC)
| Reason: Not specified