Stored proc
CREATE PROCEDURE dbo.sp_test_return
@decimal_value DECIMAL(9,4)
AS
SET NOCOUNT ON
DECLARE @created_jobs TABLE(job_id INT, job_date DATE)
INSERT INTO @created_jobs (job_id, job_date) VALUES (0, GETDATE())
INSERT INTO @created_jobs (job_id, job_date) VALUES (1, GETDATE());
INSERT INTO @created_jobs (job_id, job_date) VALUES (2, GETDATE());
SELECT * FROM @created_jobs
GO
Radzen generates the export code below where it set the input data type as float instead of decimal.
[HttpGet("/export/Testdb/sptestreturns/csv(decimal_value={decimal_value}, fileName='{fileName}')")]
public async System.Threading.Tasks.Task ExportSpTestReturnsToCSV(float? decimal_value, string fileName = null)
{
return ToCSV(ApplyQuery(await service.GetSpTestReturns(decimal_value), Request.Query), fileName);
}
[HttpGet("/export/Testdb/sptestreturns/excel(decimal_value={decimal_value}, fileName='{fileName}')")]
public async System.Threading.Tasks.Task<FileStreamResult> ExportSpTestReturnsToExcel(float? decimal_value, string fileName = null)
{
return ToExcel(ApplyQuery(await service.GetSpTestReturns(decimal_value), Request.Query), fileName);
}