Pages

Banner 468 x 60px

 

Thursday, November 23, 2017

Error SQL Server Reporting Service

0 comments
Error SQL Server Reporting Service :






Read more...

Starting sharepoint service

0 comments
Starting sharepoint service :





Read more...

Wednesday, November 22, 2017

Export Import data model AXutiL

0 comments
Export Import data model AXutiL :

cd C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin => letak folder untuk eksport

axutil export /model:"USR Model" /db:MicrosoftDynamicsAX_Model /file:JTC2012MOdel.axmodel

Read more...

controller in SSRS

0 comments
controller in SSRS :

protected void prePromptModifyContract()
{
#ISOCountryRegionCodes
DeliveryOrderContract contract;
TECDeliveryOrderTable TECDeliveryOrderTable;
FormDataSource fds;
str range;
;

contract = this parmReportContrat().parmRDPContract() as TECDeliveryOrderTable;
TECDeliveryOrderTable = args.record();
fds = args.record().datasource();

contract
}


How does your class look like?

Just to be sure, I'll show you a step by step

1. You create a class which extends from SrsReportRunController. Then you define a macro with the report name and the Data Contract class.

class forecastController extends SrsReportRunController
{
   #define.ReportName("Report.DesignName")
   forecastContract   dataContract;
}

2. Next you create a main method

public static client void main(args _args)
{
   forecastController controller = new forecastController();

   controller.parmReportName(#ReportName);
   controller.parmArgs(_args);
   controller.startOperation();
}

3. Now you override the prePromptModifyContract method

protected void prePromptModifyContract()
{
   args   Args;

   super();

   Args = this.parmArgs();

   dataContract = this.parmReportContract().parmRdpContract();
   dataContract.parmProjid(Args.record().(fieldnum(forecastTable, Projid)));
}

4. Then you create a Menu Item and choose the Controller class as the object

5. On the form you create a new Menut Item button and set the property "CopyCallerQuery" to "Yes". Then you choose the created Menu Item as the MenuItemName for the button.

That should make it work then.
Read more...

element Args() in x++

0 comments
element Args() in x++

public class ReportRun extends ObjetRun
{
   PurchTable tmpPurchTable
}

Public void init()
{
   super();
   tmpPurchTable = element.args().record();
}
Read more...

Format dates in SSRS reports

0 comments
Format dates in SSRS reports :

Untuk PrintDate (kalo kasih tanggal sekarang di report)
=Today()

=Format(Fields!myDate.Value, “M/d/yy”) - 2/11/08
=Format(Fields!myDate.Value, “MM/dd/yyyy”) - 02/11/2008
=Format(Fields!myDate.Value, “d-MMMM-yy”) - 11-December-08
=Format(Fields!myDate.Value, “d-MMM-yyyy”) - 11-Dec-2008 =Format(Fields!myDate.Value, “M/d/yyyy H:mm”) - 2/11/2008 13:50
=Format(Fields!myDate.Value, “MMM-dd-yyyy”) - Feb-11-2008 
Read more...

Melihat sesion DB SQL 2008

0 comments
Untuk melihat sesion AOS di DB SQL Server 2008

dbo.SYSSERVERSESSIONS
Read more...

Running Number in SSRS

0 comments
Running Number in SSRS :

=RunningValue(Fields!ItemId.Value, CountDistinct, Nothing)

Read more...

update_recordSet in x++

0 comments
update_recordSet in x++ :

TECDOWithdrawalList     DOWithdrawalList;
    TECCustInOutClaimTable  CustInOutClaimTable, CustInOutClaimTable2;


update_recordSet CustInOutClaimTable2
        setting TECRefDOWithdrawalRecId = DOWithdrawalList.RecId,
                TECRefWithdrawalId = DOWithdrawalList.TECWithdrawalId
            where CustInOutClaimTable2.RecId == CustInOutClaimTable.RecId;
Read more...

Disable Date in VirtualBox

0 comments
Disable Date in VirtualBox :

Open CMD, type:
1. Cd C:\Program Files\Oracle\VirtualBox
2. vboxmanage setextradata [VMname] "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" "1"
contoh :
C:\Program Files\Oracle\VirtualBox>vboxmanage setextradata "MS AX 2012R2 Contoso
" "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" "1"

or if you want to Turn it back on:
3. vboxmanage setextradata [VMname] "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" "0"

Read more...

Fixing throw error datbase dynamics AX

0 comments
Fixing throw error datbase dynamics AX :

• Right click on data Dictionary and synchronize the data Dictionary.
• Right click on AOT and compile it, it step take longer time. In the case of any error in any class, fix the issue and compiled.
• Generate full CIL.
Read more...

init using x++

0 comments
init using x++ :

public void init()
{
    super();
 
    if(element.args().record().TableId == tableNum(VendPackingSlipJour))
    {
        _AmbilRecordVendPackingSlipJour = element.args().record();
    }
    else if(element.args().record().TableId == tableNum(InventTransferParmTable))
    {
        _InventTransferParmTable = element.args().record();     
    }
}
Read more...

Get record args with menuitem in x++

0 comments
Get record args with menuitem in x++ :
 


Lihat Callernya !!!!


protected void afterOperationEnd()
{
    // start-dxl-ESLOG010TransferOrder-2013-05-29-01-58-pm
    PurchLine             purchLine;
    TECTransferOrderTable TECTransferOrderTable;
    boolean               updateStatus = true;

    // ADD by tyo
    PurchParmLine localPurchParmLine;
    MenuFunction menu = new MenuFunction(menuitemOutputStr(TECProductReceipt_WithRemarkQty_auto), MenuItemType::Output);
    Args    _args = new Args();
    // END by tyo

    ;

    if (this.purchTable().InterCompanyOrder == NoYes::Yes)
    {
        while select purchLine
            where purchLine.PurchId == this.purchTable().PurchId
        {
            if (purchLine.QtyOrdered != purchLine.receivedInTotalServer())
            {
                updateStatus = false;
                break;
            }
        }

        if (updateStatus)
        {
            changecompany(this.purchTable().InterCompanyCompanyId)
            {
                changeCompany(SalesTable::find(this.purchTable().InterCompanyOriginalSalesId).TECTransferOrderDataAreaId)
                {
                    update_recordSet TECTransferOrderTable
                        setting TECTransferStatus = TECTransferStatus::Received,
                                TECReceiptDate    = systemDateGet()
                        where TECTransferOrderTable.TECRelationId == this.purchTable().InterCompanyOriginalSalesId;
                }
            }
        }
    }
    // end-dxl-ESLOG010TransferOrder-2013-05-29-01-58-pm

    //start-BGS-EDD Indent Order
    //SalesLine::updateIndentOrderStatusPO(this.purchTable().PurchId);
    //end-BGS-EDD Indent Order
 
    // Add By Tyo
    select localPurchParmLine where localPurchParmLine.ParmId == this.parmId();
    if(tidPrintProductReceipt && localPurchParmLine)
    {
        _args.record(localPurchParmLine);       
        menu.run(_args);       
    }
    // End By Tyo   
   
      super();
}


Read more...

Only 1 layer in Dynamics AX

0 comments
Only 1 layer in Dynamics AX :

Cara narik 1 layer VAR, USR
1. Buat Project baru, lalu Open



2. Pilih tombol Filter




Klik OK


Read more...

Cara melihat siapa aja yg panggil kelas itu dengan x++

0 comments
Cara melihat siapa aja yg panggil kelas itu dengan x++ :



Read more...

More Than 2 Remote Desktop Sessions

0 comments
More Than 2 Remote Desktop Sessions :

Pada server ketik command promtgpedit.msc> computer configuration > Administrative Template > Windows Component > Remote Desktop Service > Remote Desktop Session Host > Connection.

ganti jadi Disable

Buka Remote Desktop Session Host  Configuration
Klik kanan RDP-Tcp> Network Adapter, kemudian ganti maximum connection sesuai kebutuhan.
Buka server manager, kemudian tambah role untuk remote desktop
Add role >tambahkan role remote desktop

Next…next kemudian restart
               



Read more...

Relation Custtable and CustInvoiceJour in x++

0 comments
Relation Custtable and CustInvoiceJour in x++ :

select _CustTable where _CustTable.AccountNum == CustInvoiceJour.SalesId;

.:: Atau methode ini sudah disediakan di table CustInvoiceJour ::.         

CustInvoiceJour.custTable_OrderAccount();
Read more...

Cara Enable Remote untuk Report SSRS

0 comments

Cara Enable Remote untuk Report SSRS :

Kalo muncul error pas buka report ssrs : "cannot remote ........"
Masuk ke Sql, buka database report, buka table ConfigurationInfo field EnableRemoteErrors diganti True.


Read more...

Calling report using menu item (args.record(namatable)) in x++

0 comments
Calling report using menu item (args.record(namatable)) in x++ :

void clicked()
{
    InventJournalTable     inventJournalTable;
    InventJournalTrans     inventJournalTrans;

    InventDim              localInventDim;
    CustInvoiceTrans       custInvoiceTrans;

    TECCustInOutClaimTable localTECCustInOutClaimTable;
    TECCustInOutClaimLine  localTECCustInOutClaimLine, CustInOutClaimLine;
    RetailTransactionSalesTrans retailTransactionSalesTrans;
    InventJournalCheckPost journalCheckPost;
    Args                   args = new Args();
    ;

    super();

    TECCustInOutClaimLine_ds.write();

    select firstOnly inventJournalTable
        where inventJournalTable.TECCustInClaimLineRefRecId == TECCustInOutClaimLine.RecId;
    if (!inventJournalTable)
    {
        inventJournalTable.clear();
        inventJournalTable.initFromInventJournalName(InventJournalName::find(InventParameters::find().TECCustInClaimJournalNameId));
        inventJournalTable.insert();

        select firstOnly localTECCustInOutClaimTable
            where localTECCustInOutClaimTable.RecId == TECCustInOutClaimLine.TECCustInOutClaimTableRefRecId;

        select firstOnly retailTransactionSalesTrans
            where retailTransactionSalesTrans.receiptId == localTECCustInOutClaimTable.RetailReceiptId
                && retailTransactionSalesTrans.ItemId == TECCustInOutClaimLine.ItemId;

        localInventDim.clear();
        // localInventDim.InventSiteId     = custInvoiceTrans.inventSiteId();
        // localInventDim.InventLocationId = custInvoiceTrans.inventLocationId();

     
        // localInventDim.inventDimId      = retailTransactionSalesTrans.inventDimId;
       
        // localInventDim                  = InventDim::findOrCreate(localInventDim);


        while select CustInOutClaimLine
            where CustInOutClaimLine.TECCustInOutClaimTableRefRecId == TECCustInOutClaimLine.TECCustInOutClaimTableRefRecId
        {
            ttsBegin;
                inventJournalTrans.clear();
                inventJournalTrans.initFromInventJournalTable(inventJournalTable);
                inventJournalTrans.TransDate     = systemDateGet();
                inventJournalTrans.initFromInventTable(InventTable::find(CustInOutClaimLine.ItemId));
                inventJournalTrans.InventDimId   = InventDim.inventDimId;
                inventJournalTrans.Qty           = TECCustInOutClaimLine.SalesQty;

               
                inventJournalTrans.CostPrice     = retailTransactionSalesTrans.price;
                inventJournalTrans.CostAmount    = inventJournalTrans.Qty * inventJournalTrans.CostPrice;
                inventJournalTrans.DefaultDimension = getNewDefaultDimensionTEC(InventTable::find(CustInOutClaimLine.ItemId).DefaultDimension, "1. STORE", StorageDimensions_InventLocationId.valueStr());
               
                inventJournalTrans.insert();
            ttsCommit;
        }

        info(strFmt('Claim in movement journal: %1 has been created.', inventJournalTable.JournalId));


        while select forUpdate localTECCustInOutClaimLine
            //where localTECCustInOutClaimLine.TECCustInOutClaimTableRefRecId == TECCustInOutClaimLine.TECCustInOutClaimTableRefRecId
            where localTECCustInOutClaimLine.RecId == TECCustInOutClaimLine.RecId
        {
            ttsBegin;
                localTECCustInOutClaimLine.ClaimInJournalId      = inventJournalTable.JournalId;
                localTECCustInOutClaimLine.TECClaimInStatus      = TECClaimInStatus::Received;

                 // add by Tyo -(79    OPERATION - Sales return, Trade In  dan Claim supplier In: - Harus ada siapa yang terima di gudang)
                localTECCustInOutClaimLine.TIDReceiptPerson      = curUserId();
                // end by Tyo
                localTECCustInOutClaimLine.update();
            ttsCommit;
        }


    }

    if (inventJournalTable.Posted == NoYes::No)
    {
        journalCheckPost = new InventJournalCheckPost();
        if (InventJournalCheckPost::newPostJournal(inventJournalTable).validate())
            InventJournalCheckPost::newPostJournal(inventJournalTable).run();

        info(strFmt('Claim in movement journal: %1 has been posted.', inventJournalTable.JournalId));
    }

   
     if (TECCustInOutClaimLine.IsDelivery == NoYes::Yes)
     {
         element.PostDOWithdrawal(inventJournalTable.JournalId);
     }

    TECCustInOutClaimLine_ds.executeQuery();
   
    //args.record(inventJournalTable);
    //new MenuFunction(MenuItemDisplayStr(CustFreeInvoice), MenuItemType::Display).run(args);
   
    // add by tyo - create picking list report
        args.record(TECCustInOutClaimLine);
        new MenuFunction(menuitemOutputStr(TECPickingList), MenuItemType::Output).run(Args);
    // end by tyo - create picking list report
}
Read more...

Container and unbounded string fields are not allowed in ax WHERE expression

0 comments
Container and unbounded string fields are not allowed in ax WHERE expression :
 Kalo muncul error karena -> str di public static boolean TIDCheckingKTP(str NomorKTP) -> tidak boleh str, harusnya EDT.
Read more...

Print Barcode Code using x++

0 comments
Print Barcode Code using x++ :

void clicked()
{
    //AIFD_PrintBarcode
    AI_PrintBarcodeController  aiBarcode = new AI_PrintBarcodeController();
    AI_PrintBarcodeContract    aiContract = new AI_PrintBarcodeContract();
    ProdJournalProd            prodJournalProdLoc;
    SRSPrintDestinationSettings  printSettings = new SRSPrintDestinationSettings();
    PrintJobSettings    printJobSettings = new PrintJobSettings();
    Dialog              dialog = new Dialog();
    DialogField         dialogFileName;
    str                 adobeExe;
    str                 adobeParm;

    str                 fileName;
    int                 fileCount;

    //AIFD
    InteropPermission   permission;
    str errorMessage;
    //END

    real WeightInreal;


    permission = new InteropPermission(InteropKind::ClrInterop);
    permission.assert();

    super();


    try
    {
        prodJournalProdLoc = ProdJournalProd_ds.getFirst(true);

        while (prodJournalProdLoc)
        {
            fileCount++;
            aiBarcode.parmReportName(ssrsReportStr(AI_PrintBarcoderReport,Report));
            aiBarcode.parmShowDialog(false);
            aiContract.parmRecordId(prodJournalProdLoc.RecId);
            aiContract.parmDocumentTitle("x");

            //printSettings = aiBarcode.parmReportContract().parmPrintSettings();
            printSettings.printMediumType(SRSPrintMediumType::File);
            //printSettings.landscape(false);
            //printSettings.printerPageSettings('KRRLabelBarcode');
            //info(strFmt("%1",printSettings.printerPageSettings()));

            fileName = strFmt("D:\\barcode%1.pdf",fileCount);

            printSettings.fileFormat(SRSReportFileFormat::PDF);
            printSettings.fileName(fileName);
            printSettings.printerName("TOSHIBA B-SA4TP TS");
            printSettings.landscape(false);
            printSettings.overwriteFile(true);
            aiBarcode.parmReportContract().parmRdpContract(aiContract);
            aiBarcode.parmReportContract().parmPrintSettings(printSettings);

            aiBarcode.startOperation();

            WeightInReal = sleep(500);
            //printJobSettings.printerSettings('SysPrintForm');
            printJobSettings.setTarget(PrintMedium::Printer);
            printJobSettings.preferredTarget(PrintMedium::Printer);
            adobeExe = WinAPI::findExecutable(fileName);

            adobeParm = strFmt(' /t "%1" "%2" "%3" "%4"',
                               fileName,
                               "TOSHIBA B-SA4TP TS",
                               printJobSettings.printerDriverName(),
                               printJobSettings.printerPortName());

            winAPI::shellExecute(adobeExe,  adobeParm);

            WeightInReal = sleep(500);

            prodJournalProdLoc = ProdJournalProd_ds.getNext();
         }


     CodeAccessPermission::revertAssert();
    }
    catch(Exception::CLRError)
    {
        errorMessage = AifUtil::getClrErrorMessage();

        CodeAccessPermission::revertAssert();

        throw error(errorMessage);
    }

    //END
}
Read more...

What is the difference between AmountCur and AmountMst in Dynamics AX

0 comments
What is the difference between AmountCur and AmountMst in Dynamics AX :

What is the difference between AmountCur and AmountMst in Dynamics AX?

AmountCur is the amount in the entered currency

and AmountMST is the amount in the base currency for the company

Read more...

Kalau ada error di Presyncronize maka masuk ke System administrator Enterprise Portal

0 comments

Kalau ada error di Presyncronize maka masuk ke System administrator Enterprise Portal :
Kalau ada error di Presyncronize maka masuk ke System administrator > Setup > Batch Group >

pindahkan semuanya ke Selected Servers
Read more...

Jika EP AX2012R3 tidak bisa dibuka di dalam VM itu sendiri

0 comments
Jika EP AX2012R3 tidak bisa dibuka di dalam VM itu sendiri :

Jika VM AX2012R3 tidak bisa membuka web portal AX, maka kita perlu mendaftarkan alamat Enterprise portal yang ada di AX (System Administrator -> Setup -> Enterprise Portal -> Website), ke dalam folder hosts (Windows -> System32 -> drivers -> etc).





Read more...

Untuk ambil data dengan methode menggunakan find dengan x++

0 comments

Untuk ambil data dengan methode menggunakan find dengan x++ :

_BuyBackGuaranteeTMP.CustomerId = SalesTable::find(_TECBuyBGuaranteeTable.SalesId).CustAccount;
contoh :
Saya mau ambil CustAccount dari table SalesTable
1.      _BuyBackGuaranteeTMP adalah Table Temporary
2.      CustomerId adalah variabel yang ingin dimunculkan di Dataset
3.      SalesTable adalah tabel yang menyimpan field CustAccount
4.      Find adalah methodenya
5.      _TECBuyBGuaranteeTable adalah Table Master yang mempunyai relasi dengan SalesTable (tergantung methode yg ada di salestable juga kaleeee....)
6.      SalesId adalah field yang menghubungan antara _TECBuyBGuarantee dengan SalesTable
7.      CustAccount adalah field tujuan yang ingin diambil

Yang hendak diambil dari TECBuyBackGuarantee adalah Customer Account yang berasal dari tabel SalesTable.




_BuyBackGuaranteeTMP.CustomerID          = SalesTable::find(_TECBuyBGuaranteeTable.Salesid).CustAccount;
atau :

_BuyBackGuaranteeTMP. CustomerID = Select Salestable where Salestable.Salesid == _TECBuyBGuaranteeTable.Salesid;
Read more...

SystemdateGet Print date regarding server or Today

0 comments
SystemdateGet Print date regarding server or Today :

display str TglCetak()
{
    //return strFmt('Tgl. Cetak : %1', DateTimeUtil::getSystemDateTime());
    return strFmt('Tgl. Cetak : %1', systemDateGet());
    //return strFmt('Tgl. Cetak :%1', today
}
Read more...

Change automatic change next page using x++

0 comments
Change automatic change next page using x++ :

if(nourut == 10)
    {
element.newPage();
    }
Read more...

find phone using x++

0 comments
Find phone using x++ :

static void Job10(Args _args)
{
    VendTable vnd;
    ;
    vnd = VendTable::find("V-00000");

    info(vnd.phone());
    info(vnd.telefax());
}
Read more...

Public Void with parameter using x++

0 comments
Public Void with parameter using x++ :

public void addData(TransDate fromDate, TransDate toDate,
                    InventLocationId warehouse, RefRecId planVersionId)
{
    TIDBOB      BOB, BOB2;
    TIDBOBTmp   BOBTmp;
    InventDim   inventDim;
    ItemId      tmpItemId;
    TransDate   date1, date2;
    str         datetmp1, datetmp2;
    int         m, y;
    ;

    m = mthOfYr(fromDate);
    m = m - 1;
    y = year(fromDate);

    if (m == 0)
    {
        m = 12;
        y = y - 1;
    }

    datetmp1 = int2str(m)+'/25/'+int2str(y);
    date1 = str2Date(datetmp1, 213);
    date2 = dateEndMth(date1);


    inventDim.InventLocationId  = warehouse;
    inventDim.InventSiteId      = InventLocation::find(warehouse).InventSiteId;
    inventDim                   = InventDim::findOrCreate(inventDim);

    if (warehouse != '')
    {
        while select BOB order by BOB.ItemId
            where BOB.ReqDateDlv >= dateStartMth(fromDate)
               && BOB.ReqDateDlv <= dateEndMth(toDate)
               && BOB.InventLocationId == warehouse
               && BOB.PlanVersionid == planVersionId
        {
            if (tmpItemId == BOB.ItemId) || !tmpItemId)
            {
                this.PrintDate          = dateStartMth(fromDate);
                this.InventLocationId   = warehouse;
                this.ItemId             = BOB.ItemId;
                this.UnitId             = InventTable::find(BOB.ItemId).inventUnitId();
                this.CreateDate         = BOB.CreateDate;
                this.PlanVersionId      = BOB.PlanVersionid;

                if (dayOfMth(BOB.ReqDateDlv) >= 1 && dayOfMth(BOB.ReqDateDlv) <= 5)
                {
                    this.qtyperiode1 += BOB.Qty;
                }

                if (dayOfMth(BOB.ReqDateDlv) >= 6 && dayOfMth(BOB.ReqDateDlv) <= 10)
                {
                    this.qtyperiode2 += BOB.Qty;
                }

                if (dayOfMth(BOB.ReqDateDlv) >= 11 && dayOfMth(BOB.ReqDateDlv) <= 15)
                {
                    this.qtyperiode3 += BOB.Qty;
                }

                if (dayOfMth(BOB.ReqDateDlv) >= 16 && dayOfMth(BOB.ReqDateDlv) <= 20)
                {
                    this.qtyperiode4 += BOB.Qty;
                }

                if (dayOfMth(BOB.ReqDateDlv) >= 21 && dayOfMth(BOB.ReqDateDlv) <= 25)
                {
                    this.qtyperiode5 += BOB.Qty;
                }

                if (dayOfMth(BOB.ReqDateDlv) >= 26 && dayOfMth(BOB.ReqDateDlv) <= 31)
                {
                    this.qtyperiode6 += BOB.Qty;
                }

            }
           
           
            else
            {
                this.insert();

                this.PrintDate          = dateStartMth(fromDate);
                this.InventLocationId   = warehouse;
                this.ItemId             = BOB.ItemId;
                this.UnitId             = InventTable::find(BOB.ItemId).inventUnitId();
                this.CreateDate         = BOB.CreateDate;
                this.PlanVersionId      = BOB.PlanVersionid;
                this.qtyperiode1        = 0;
                this.qtyperiode2        = 0;
                this.qtyperiode3        = 0;
                this.qtyperiode4        = 0;
                this.qtyperiode5        = 0;
                this.qtyperiode6        = 0;

                if (dayOfMth(BOB.ReqDateDlv) >= 1 && dayOfMth(BOB.ReqDateDlv) <= 5)
                {
                    this.qtyperiode1 += BOB.Qty;
                }

                if (dayOfMth(BOB.ReqDateDlv) >= 6 && dayOfMth(BOB.ReqDateDlv) <= 10)
                {
                    this.qtyperiode2 += BOB.Qty;
                }

                if (dayOfMth(BOB.ReqDateDlv) >= 11 && dayOfMth(BOB.ReqDateDlv) <= 15)
                {
                    this.qtyperiode3 += BOB.Qty;
                }

                if (dayOfMth(BOB.ReqDateDlv) >= 16 && dayOfMth(BOB.ReqDateDlv) <= 20)
                {
                    this.qtyperiode4 += BOB.Qty;
                }

                if (dayOfMth(BOB.ReqDateDlv) >= 21 && dayOfMth(BOB.ReqDateDlv) <= 25)
                {
                    this.qtyperiode5 += BOB.Qty;
                }

                if (dayOfMth(BOB.ReqDateDlv) >= 26 && dayOfMth(BOB.ReqDateDlv) <= 31)
                {
                    this.qtyperiode6 += BOB.Qty;
                }

                // Menambahkan quantity period terakhir 1 bulan sebelumnya

                select sum(Qty) from BOB2
                    where BOB2.ReqDateDlv >= date1
                       && BOB2.ReqDateDlv <= date2
                       && BOB2.InventLocationId == warehouse
                       && BOB2.ItemId == tmpItemId;

                    update_recordSet BOBTmp
                        setting qtyperiode0 = BOB2.qty
                            where BOBTmp.ItemId == tmpItemId;
            }

            tmpItemId = BOB.ItemId;
        }
        this.insert();

        // Menambahkan quantity period terakhir 1 bulan sebelumnya

                select sum(Qty) from BOB2
                    where BOB2.ReqDateDlv >= date1
                       && BOB2.ReqDateDlv <= date2
                       && BOB2.InventLocationId == warehouse
                       && BOB2.ItemId == tmpItemId;

                    update_recordSet BOBTmp
                        setting qtyperiode0 = BOB2.qty
                            where BOBTmp.ItemId == tmpItemId;
    }
    else
    {
        while select BOB order by BOB.ItemId
            where BOB.ReqDateDlv >= dateStartMth(fromDate)
               && BOB.ReqDateDlv <= dateEndMth(toDate)
        {
            if (tmpItemId == BOB.ItemId || !tmpItemId)
            {
                this.PrintDate          = dateStartMth(fromDate);
                this.InventLocationId   = warehouse;
                this.ItemId             = BOB.ItemId;
                this.UnitId             = InventTable::find(BOB.ItemId).inventUnitId();
                this.CreateDate         = BOB.CreateDate;

                if (dayOfMth(BOB.ReqDateDlv) >= 1 && dayOfMth(BOB.ReqDateDlv) <= 5)
                {
                    this.qtyperiode1 += BOB.Qty;
                }

                if (dayOfMth(BOB.ReqDateDlv) >= 6 && dayOfMth(BOB.ReqDateDlv) <= 10)
                {
                    this.qtyperiode2 += BOB.Qty;
                }

                if (dayOfMth(BOB.ReqDateDlv) >= 11 && dayOfMth(BOB.ReqDateDlv) <= 15)
                {
                    this.qtyperiode3 += BOB.Qty;
                }

                if (dayOfMth(BOB.ReqDateDlv) >= 16 && dayOfMth(BOB.ReqDateDlv) <= 20)
                {
                    this.qtyperiode4 += BOB.Qty;
                }

                if (dayOfMth(BOB.ReqDateDlv) >= 21 && dayOfMth(BOB.ReqDateDlv) <= 25)
                {
                    this.qtyperiode5 += BOB.Qty;
                }

                if (dayOfMth(BOB.ReqDateDlv) >= 26 && dayOfMth(BOB.ReqDateDlv) <= 31)
                {
                    this.qtyperiode6 += BOB.Qty;
                }

            }
            else
            {
                this.insert();

                this.PrintDate          = dateStartMth(fromDate);
                this.InventLocationId   = warehouse;
                this.ItemId             = BOB.ItemId;
                this.UnitId             = InventTable::find(BOB.ItemId).inventUnitId();
                this.CreateDate         = BOB.CreateDate;
                this.qtyperiode1        = 0;
                this.qtyperiode2        = 0;
                this.qtyperiode3        = 0;
                this.qtyperiode4        = 0;
                this.qtyperiode5        = 0;
                this.qtyperiode6        = 0;

                if (dayOfMth(BOB.ReqDateDlv) >= 1 && dayOfMth(BOB.ReqDateDlv) <= 5)
                {
                    this.qtyperiode1 += BOB.Qty;
                }

                if (dayOfMth(BOB.ReqDateDlv) >= 6 && dayOfMth(BOB.ReqDateDlv) <= 10)
                {
                    this.qtyperiode2 += BOB.Qty;
                }

                if (dayOfMth(BOB.ReqDateDlv) >= 11 && dayOfMth(BOB.ReqDateDlv) <= 15)
                {
                    this.qtyperiode3 += BOB.Qty;
                }

                if (dayOfMth(BOB.ReqDateDlv) >= 16 && dayOfMth(BOB.ReqDateDlv) <= 20)
                {
                    this.qtyperiode4 += BOB.Qty;
                }

                if (dayOfMth(BOB.ReqDateDlv) >= 21 && dayOfMth(BOB.ReqDateDlv) <= 25)
                {
                    this.qtyperiode5 += BOB.Qty;
                }

                if (dayOfMth(BOB.ReqDateDlv) >= 26 && dayOfMth(BOB.ReqDateDlv) <= 31)
                {
                    this.qtyperiode6 += BOB.Qty;
                }

                // Menambahkan quantity period terakhir 1 bulan sebelumnya

                select sum(Qty) from BOB2
                    where BOB2.ReqDateDlv >= date1
                       && BOB2.ReqDateDlv <= date2
                       && BOB2.InventLocationId == warehouse
                       && BOB2.ItemId == tmpItemId;

                    update_recordSet BOBTmp
                        setting qtyperiode0 = BOB2.qty
                            where BOBTmp.ItemId == tmpItemId;
            }

            tmpItemId = BOB.ItemId;
        }
        this.insert();

        // Menambahkan quantity period terakhir 1 bulan sebelumnya

                select sum(Qty) from BOB2
                    where BOB2.ReqDateDlv >= date1
                       && BOB2.ReqDateDlv <= date2
                       && BOB2.InventLocationId == warehouse
                       && BOB2.ItemId == tmpItemId;

                    update_recordSet BOBTmp
                        setting qtyperiode0 = BOB2.qty
                            where BOBTmp.ItemId == tmpItemId;
    }
}




Read more...

A financial dimension value is based on the record and has been used on a transaction. You cannot delete the record

  SOLUTION delete in table DimensionAttributeLevelValue base on Bank Account  :  and Delete the Bank Account FINISH