USP_DATAFORMTEMPLATE_VIEW_DISBURSEMENTPROCESSTEMPLATEFORMATDETAILS

The load procedure used by the view dataform template "Disbursement Process Template Format Details 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.
@FORMATID uniqueidentifier INOUT FORMATID
@DESCRIPTION nvarchar(100) INOUT Description
@REPORTNAME nvarchar(100) INOUT ReportName
@TYPE nvarchar(17) INOUT Type
@PRENUMBERED bit INOUT PreNumbered
@PRINTNUMBER bit INOUT Print disbursement number
@PRINTORDER nvarchar(100) INOUT Print order

Definition

Copy


CREATE procedure dbo.USP_DATAFORMTEMPLATE_VIEW_DISBURSEMENTPROCESSTEMPLATEFORMATDETAILS
(
    @ID uniqueidentifier,
    @DATALOADED bit = 0 output,
    @FORMATID uniqueidentifier = null output,
    @DESCRIPTION nvarchar(100) = null output,
    @REPORTNAME nvarchar(100) = null output,
    @TYPE nvarchar(17) = null output,
    @PRENUMBERED bit = null output,
  @PRINTNUMBER bit = null output
  ,@PRINTORDER nvarchar(100) = null output
)
as
    set nocount on;

    -- be sure to set this, in case the select returns no rows

    set @DATALOADED = 0;

    -- populate the output parameters, which correspond to fields on the form.  Note that

    -- we set @DATALOADED = 1 to indicate that the load was successful.  Otherwise, the system

    -- will display a "no data loaded" message.

    select 
        @DATALOADED = 1,
        @FORMATID = F.ID,
        @DESCRIPTION = F.DESCRIPTION,
        @REPORTNAME  = RC.NAME,
        @TYPE = F.TYPE,
        @PRENUMBERED = PRENUMBERED,
    @PRINTNUMBER = PRINTNUMBER
    ,@PRINTORDER = PRINTTRANSACTIONSORDER + ' - ' + PRINTORDER
    from dbo.DISBURSEMENTFORMAT F
        inner join dbo.REPORTCATALOG RC on F.REPORTCATALOGID = RC.ID
    where F.ID = @ID

    return 0;