USP_DATAFORMTEMPLATE_VIEW_BATCHREPORTSPEC

The load procedure used by the view dataform template "Batch Report Spec Lookup View Form"

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN The input ID parameter used to load the fields defined on the form.
@DATALOADED bit INOUT Output parameter indicating whether or not data was actually loaded.
@CONTROLREPORTID uniqueidentifier INOUT Control report spec
@EXCEPTIONREPORTID uniqueidentifier INOUT Exception report spec
@BATCHTYPENAME nvarchar(100) INOUT Batch type name

Definition

Copy


CREATE procedure dbo.USP_DATAFORMTEMPLATE_VIEW_BATCHREPORTSPEC
(
    @ID uniqueidentifier,
    @DATALOADED bit = 0 output,
    @CONTROLREPORTID uniqueidentifier = null output,
    @EXCEPTIONREPORTID uniqueidentifier = null output,
    @BATCHTYPENAME nvarchar(100) = null output
)
as 
set nocount on;

set @DATALOADED = 0

select 
    @DATALOADED = 1,
    @CONTROLREPORTID = BATCHTYPECATALOG.CONTROLREPORTREPORTSPECID,    
    @EXCEPTIONREPORTID = BATCHTYPECATALOG.EXCEPTIONREPORTREPORTSPECID,
    @BATCHTYPENAME = BATCHTYPECATALOG.NAME
from dbo.BATCH
inner join dbo.BATCHTEMPLATE on BATCHTEMPLATE.ID = BATCH.BATCHTEMPLATEID
inner join dbo.BATCHTYPECATALOG on BATCHTYPECATALOG.ID = BATCHTEMPLATE.BATCHTYPECATALOGID
where BATCH.ID = @ID

return 0;