﻿1. ReportFields :
---  Parameter Related ---------------------------------------
     OP - Organization
     AP - Accounts   
     PP - Product
     GP - Geographical
     OT - Others
     TP - Tax / Excise
     SP - Store / Location
     CP - Commission (Agent / Salesman)
     
---  Master Related ---------------------------------------
     OPBK - Book Master 
     OPBM - Branch Master 
     OPBU - BusinessUnit Master 
     OPST - Voucher Status 
     
     APAM - Account Master
     APAC - Account Category
     APAL - Account Alliance
     
     CPAG - Agent
     CPEM - Employee (salesman)
     
     GPCN - Country
     GPST - State
     GPCT - City
     GPAR - Area
     GPZN - Zone

     PPPM - Product Master
     PPPC - Product Category
     PPPB - Product Brand

     TPTX - Tax Master
     TPEX - Excise Master

     SPST - StoreLocation Master
     SPPR - Process Master
     SPRK - Rack Master
     
     OTVM - Voucher Mode 
     OTVR - Voucher Reference

---  Transaction Related ---------------------------------------
     MT   - Main Table       ( BookMain Type )
     MTPD - Product Details  ( BookMain Type )
     MTPT - Product Taxes    ( BookMain Type )
     MTTC - Term & Condition ( BookMain Type )
     MTPS - Payment Schedule ( BookMain Type )
     MTTD - Tax & Duties     ( BookMain Type )
     
-- E.G.
if {?@ReportCode} ="SOREPO-PPPC" Then
    {SalesOrder_Analysis;1.ProductCategoryName}
Else if {?@ReportCode} ="SOREPO-PPPB" Then
    {SalesOrder_Analysis;1.ProductBrandName}
Else if {?@ReportCode} ="SOREPO-GPCN" Then
    {SalesOrder_Analysis;1.CountryName}
Else if {?@ReportCode} ="SOREPO-GPST" Then
    {SalesOrder_Analysis;1.StateName}
Else if {?@ReportCode} ="SOREPO-GPCT" Then
    {SalesOrder_Analysis;1.CityName}
Else if {?@ReportCode} ="SOREPO-GPAR" Then
    {SalesOrder_Analysis;1.AreaName}
Else if {?@ReportCode} ="SOREPO-GPZN" Then
    {SalesOrder_Analysis;1.ZoneName}
Else if {?@ReportCode} ="SOREPO-DATE" Then
    totext({SalesOrder_Analysis;1.OrderDate})
Else if {?@ReportCode} ="SOREPO-APAM" Then
    {SalesOrder_Analysis;1.AccountName}
Else if {?@ReportCode} ="SOREPO-APAC" Then
    {SalesOrder_Analysis;1.AccountCategoryName}
Else if {?@ReportCode} ="SOREPO-APAL" Then
    {SalesOrder_Analysis;1.AccountAllianceName}
Else iF {?@ReportCode} ="SOREPO-CPSL" Then
    {SalesOrder_Analysis;1.EmployeeName}
Else If {?@ReportCode} ="SOREPO-CPAG" Then
    {SalesOrder_Analysis;1.AgentName}
    
===REPORT SETUP===================================================================
ReportType [D- Documents, C - Checklist, R - Register]
1. ReportFrom - "R" [applicable to D,C] (recordid)  [applicable to D]
   * This will pick up only selected recordkeys
   e.g. [ProductBOMSearch]  BOMId@BIGINT@=(txtSearch)
     
2. ReportFrom - "F" (search/filter)
   * This will pick up only filter criteria
   e.g. [SupplierMasterSearch] WhereCondition@VARCHAR@50=AM.AccountType In('S'),AccountType@VARCHAR@50=(txtSearch),AccountCode@VARCHAR@50=(txtSearch),AccountName@VARCHAR@50=(txtSearch),BusinessUnitId@bigint@0=|BusinessUnitId|,BranchId@bigint@0=|BranchId|

3. ReportFrom - "C" [applicable to D,C] (search table selected rows multiple columns value + objects value)
   * This will pick up multiple columns value + object values + filter criteria
   e.g. [ProductBranchRate] ProductId@nvarchar@4000=(hdnRecordKeys),sssBranchId@bigint@0=|BranchId|,hdnSearchValue@nvarchar@4000=(hdnSearchValue)    
   * This will pick up multiple columns value 
   e.g. [OpeningStockSearch] StoreLocationId@nVARCHAR@4000=(txtSearch),CategoryId@nVARCHAR@4000=(txtSearch),SubCategoryID@nVARCHAR@4000=(txtSearch)   
    
4  ReportFrom - "Q" [applicable to D,C,R] (search table selected Ids + objects value)  
   * This will pick up selected recordIds + object values + filter criteria
   e.g. [SalesOrderSearch] hdnRecordKeys@VARCHAR@8000=(@hdnRecordKeys),BranchId@BIGINT@0=|BranchId|,BookId@BIGINT@0=[BookID],FromDate@Datetime@0=(txtFromDate),ToDate@Datetime@0=(txtToDate)
    
    


     
   

     
    
   