Pages

Banner 468 x 60px

 

Wednesday, January 14, 2015

void clicked()

0 comments
void clicked()
{

    SrsReportRunController                  reportRunController;
    Map                                     queryContracts;
    MapEnumerator                           mapEnum;
    Query                                   query;
    QueryBuildRange                         range;

    SrsReportDataContract                   contract;
    TECSOContract                           rdpContract;
    //JournalNameId                           ScraptReworkJournalNameId;

    reportRunController = new SrsReportRunController();
    reportRunController.parmReportName(ssrsReportStr(TECJTCEDDSls04packingSlipSo ,Report));
    reportRunController.parmLoadFromSysLastValue(false);

    // Set printer settings (print to file, format, filename, etc).
    contract    = reportRunController.parmReportContract();
    rdpContract = contract.parmRdpContract() as TECSOContract;

    queryContracts = contract.parmQueryContracts();
    mapEnum = queryContracts.getEnumerator();

    while(mapEnum.moveNext())
    {
        query = mapEnum.currentValue();
        SysQuery::findOrCreateRange(query.dataSourceTable(tableNum(CustPackingSlipJour)),fieldNum(CustPackingSlipJour, recId)).value(queryValue(CustPackingSlipJour.RecId));
        reportRunController.runReport();
    }
    //super();

    super();
}
Read more...

Tuesday, January 6, 2015

While Select forupdate from 2 different Table AX

0 comments
static void forupdate(Args _args)
{
    InventTable             _inventTable;
    InventItemGroupItem     _inventItemGroupItem;   
    ItemGroupId             _ItemGroupId = _inventItemGroupItem.ItemGroupId ;   
   
   
    ttsBegin;
    while select forUpdate _inventTable
        exists join _inventItemGroupItem
            where _inventItemGroupItem.ItemGroupId == "WIP" && _inventTable.TECIsOverideInvTransParam == NoYescombo::Yes
    {
        _inventTable.TECIsOverideInvTransParam = NoYesCombo::No;
        _InventTable.update();
    } 
    ttsCommit;
   

}

Regards,
Tyo
Read more...

Thursday, December 25, 2014

Microsoft Dynamics AX Dates And Time functions

0 comments
today() ————————————>The today function returns the system date,This function does not support time zones. getSystemDateTime() —————>Gets the current UTC time as a utcdatetime type.
systemDateGet () ———————->The systemDateGet method uses the system date in Microsoft Dynamics AX.
  • Use DateTimeUtil::getSystemDateTime instead of systemDateGet or today. The today function uses the date of the machine. The systemDateGet method uses the system date in Microsoft Dynamics AX. Only DateTimeUtil::getSystemDateTime compensates for the time zone of the user.
  • Avoid using date2str for performing date conversions.
currentDateTime = DateTimeUtil::applyTimeZoneOffset(DateTimeUtil::utcNow(), DateTimeUtil::getUserPreferredTimeZone());
Job
date d;
str time1=”0.50″;
TimeOfDay time;
time = str2time(time1); ———————————————————> convert the String to Date
info(strFmt(“%1″,dayName(dayOfMth(today())))); ———————-> Name of the day in String
print dateMthFwd(systemdateget(),5);  ————————————>  forward to the 5 months
print dateMthFwd(systemdateget(),-5); ————————————> Backward to the 5 Months
 pause;
 Date to String Conversion
info(date2str(today(),123,2,2,2,2,4));
info(date2str(systemDateGet(),123,2,2,2,2,4));
info(date2str(DateTimeUtil::date(DateTimeUtil::getSystemDateTime()),123,2,2,2,2,4));
Get the time in milliseconds
str  milliSecondsAlive = int2str(winApi::getTickCount()); ——————–> Time in MilliSec
str  timeStr;
timeStr = strFmt(“%1 %2″, time2str(timeNow(), 3, 1), substr(milliSecondsAlive, strlen(milliSecondsAlive)-2, 2));
Date And Time Stuff
    str time1=”0.50″;
    TimeOfDay time;
    time = str2time(time1);
    info(strFmt(“%1″,time));                                                                   //convert time ToDate string
    info(strFmt(“%1″,dayName(dayOfMth(today()))));           // Name of the Day in String

Read more...

How to Fix “Insufficient Space” in Android

0 comments

Cara Mudah Mengatasi “Insufficient Space” Pada Android
Smartphone berbasis Android saat ini makin banyak digunakan bukan lagi karena tren atau sekedar ikut-ikutan. Banyak orang yang sudah sadar akan manfaat sebuah smartphone atau gadget berbasis Android lainnya dalam menunjang pekerjaan mereka sehari-hari. Sebuah smartphone handalpun kemudian menjadi pilihan untuk menghindari hal-hal yang tidak diinginkan selama beraktifitas menggunakan Android terjadi.

Canggih dan dibekali dengan kemampuan yang luar biasa bukan jaminan sebuah smartphone berbasis Android atau gadget lainnya terlepas dari masalah teknis yang sering terjadi seperti smartphone menjadi lambat, kekurangan memori, dan juga pesan error “insufficient space on the device” yang terjadi pada aplikasi Google Play Store di Androidmu.
Softrickinfo juga sempat mengalami pesan error bertuliskan “insufficient space on the device” ketika akan mengupdate dan menginstal beberapa aplikasi melalui Google Play Store. Setelah mencari referensi di melalui mesin pencari, Softrickinfo menemukan beberapa cara untuk mengatasi masalah yang bisa menyerang pada semua pengguna Android ini.
Setelah mengikuti beberapa petunjuk dan mendownload serta menggunakan aplikasi untuk memperbaikinya, ternyata pesan error tersebut tidak 100 persen hilang. Setelah membaca ulang semua referensi yang sempat digunakan, akhirnya Softrickinfo menemukan satu hal yang sama pada setiap artikel untuk masalah ini, yaitu:
“Masalah insufficient space on the device adalah penyakit atau masalah yang sering terjai pada aplikasi Google Play Store versi terbaru”.

Sayangnya tidak dieritahukan Google Play Store terbaru versi berapa yang dimaksud. Dari situ Softrickinfo menyimpulkan bahwa masalah “Insufficient Space” ini bisa diatasi dengan cara menguninstal update Google Play Store yang Softrickinfo gunakan.

Inilah cara mengatasi “Insufficient Space” di Android yang Softrickinfo lakukan. Pertama, masuk ke menu Settings. Pilih Apps atau Aplikasi, setelah itu cari aplikasi Google Play Store. Kamu bisa menemukannya di beberapa Tab Menu yang ada, Softrickinfo menyarakan untuk menggunakan tab All agar bisa melihat semua aplikasi yang terinstal secara lengkap.
Setelah kamu menemukan aplikasi Google Play Store, tap atau sentuh aplikasi tersebut hingga memunculkan tampilan menu baru. Selanjutnya tap menu “Uninstall Update” lalu keluar dari menu Settings dan coba update atau instal beberapa aplikasi yang kamu inginkan di Play Store.

Cara mudah mengatasi “Insufficient Space on The Device” di Android ini sudah berhasil diterapkan di Smartphone Android Samsung Galaxy Young
Read more...

Wednesday, September 17, 2014

Unable to logon On Microsoft Dynamics, SSRS reports error only with one user

0 comments

Unable to logon On Microsoft Dynamics, SSRS reports error only with one user

 

Solution :

Setting the Reporting Services Execution Account to the same user as the Dynamics AX Service Account solved this issue for me.

Read more...

Wednesday, September 10, 2014

Solution for the error-”This computer could not authenticate with Domain Controller”

0 comments

Solution for the error-”This computer could not authenticate with Domain Controller”

Sometimes in an Active directory environment administrators may find problems that the Domain users/administrators are not able to login to a member server or a client where they can able to login as local admin. Upon  checking the logs they can see  this error – This computer could not authenticate with Domain Controller with the following detailed error message.
“This computer could not authenticate with DomainController’ a Windows domain controller for domain DOMAIN, and therefore this computer might deny logon requests. This inability to authenticate might be caused by another computer on the same network using the same name or the password for this computer account is not recognized. If this message appears again, contact your system administrator.”
Possible causes
  • The problematic system was powered off more than the days the password expiry days mentioned in the domain group policy.
  • The secure channel between DC and problematic system is broken.
Possible solutions
  • Make the server back to Workgroup and rejoin the domain.
  • Reset the computer password, to do this follow the steps below
1. Go to the member server as local admin;
2. Issue the command “klist purge” to clear the Kerberos ticket cache on this server. If your server doesn’t have klist command, you could download it from:
http://www.microsoft.com/en-us/download/details.aspx?id=17657
3. Type the command “netdom resetpwd /s:x.x.x.x  /ud:domain\User /pd:*”
In this command, please use the PDC’s IP address replace the x.x.x.x; Use your domain administrator replace the domain\user, like this “your domain\administrator”
4. After that, the system will ask your domain administrator’s password, please type it on CMD;
5. After the execution of all commands you should restart the machine and try to login with the domain admin user.
If this is not working Make the server back to Workgroup and rejoin domain to do it without losing its SID follow these two steps.
  • In AD right click the computer and select Reset Account. Then re-join without un-joining the computer to the domain. Reboot required.
  • In an elevated command prompt type: nltest /Server: ServerName /SC_Reset:Domain\DomainController  No rejoin. No reboot.

Read more...

Friday, August 15, 2014

Microsoft Dynamics AX 2012 Reporting - tips how to improve performance

0 comments
There are some tips we can use to improve performance of reports for Dynamics AX 2012.
  1. Use static reports. The deployment of static reports is described here: http://technet.microsoft.com/en-us/library/hh496446.aspx In this way we will safe several calls to Metadata service to get labels values and correct formatting of dates and numbers.
  2. Install application hotfix KB 2879661 which fix the situation when first generation of a report after Dynamics AX client restart takes long. This happens for each user.
  3. Newest kernel. Hotfixes for performance improvement are included in new kernels that are released; sometimes there is a dramatic impact on performance.
  4. In the morning a first report generation takes a lot of time
SSRS uses session pooling. The first request that comes in from a user – a session will be created for them within the AOS services. Each user gets a session cached on the AOS services, so subsequent calls just reuse the session which matches the user who is making the request. This means that the first time this is created for the user the report will perform slower.
SSRS also uses a metadata cache the first request coming in which needs a certain piece of metadata, the metadata is read from the application code, and then cached in SSRS so it doesn’t have to read it subsequent times. There is one metadata cache for all users – once an object is cached in metadata, the services don’t go back to the code and retrieve it again, and they just read from cache, until the cache is cleared. This is also why a report may become slower the first time it is run.
The RecycleTime is used to restart the application domain which causes a refresh of the metadata.You could edit the RecycleTime (value is in Minutes) to therefore stop the cache from clearing and which then stop the extra hop to the AOS to gather the metadata.
Edit the <RecycleTime> element within:
RSReportServer.config (http://technet.microsoft.com/en-us/library/ms157273.aspx )
Open the RsReportServer.config file.
•              If you are using SQL Server 2008, the default location of this file is: \Program Files\Microsoft SQL Server\MSRS10.[SSRSInstanceName]\Reporting Services\ReportServer.
•              If you are using SQL Server 2008 R2, the default location of this file is: \Program Files\Microsoft SQL Server\MSRS10_50.[SSRSInstanceName]\Reporting Services\ReportServer.
•              If you are using SQL Server 2012, the default location of this file is: \Program Files\Microsoft SQL Server\MSRS11.[SSRSInstanceName]\Reporting Services\ReportServer
The default value is 720 (the value is in min so it is 12 hours.
NOTE:
Problems you may see when deploying reports because of metadata caching.
A new field is added to a table in AX, the field is used on a report in VS. The report deploys to SSRS.
However when the report is called, it fails on the new field.
This is because SSRS caches metadata. The new object is not recognized as the old metadata is still cached
The other solution is when every morning the first user has to wait for report very long is to pre-warm up the specific report. We would have to choose those reports which are critical for customer and have to run fast regards the time. To pre-warm up the report we can:
  1. Run report in batch job ie. SalesInvoice report:
public void run()
    {
       SrsReportRunController controller = new SrsReportRunController();
    SrsReportDataContract contract;
    SalesInvoiceContract rdpContractClass;
    LogisticsAddressCountryRegionISOCode code = "US";
    // establish the report name
    controller.parmReportName(ssrsReportStr(SalesInvoice, Report));
    // suppress the parameter dialog
    controller.parmShowDialog(false);
    controller.parmReportContract().parmPrintSettings().printMediumType(SRSPrintMediumType::File);
    controller.parmReportContract().parmPrintSettings().fileFormat(SRSReportFileFormat::PDF);
    controller.parmReportContract().parmPrintSettings().overwriteFile(true);
    controller.parmReportContract().parmPrintSettings().fileName("c:\\TEMP\\DummyReport.pdf");
    // set the required parameter.
    contract = controller.parmReportContract(); 
    rdpContractClass = contract.parmRdpContract() as SalesInvoiceContract;
    rdpContractClass.parmCountryRegionISOCode(code);
    // start the operation
    controller.runReport();
    }
2. Run Power-Shell script. . This solution is not so easy as we need to specify correct parameters which is not so obvious in Dynamics AX case. So to get parameters values we can run following SQL on Reporting Services database (this is SalesInvoice example):

SELECT e.timestart,DATEDIFF(ms,e.[timestart],e.[timeend]) AS [TotalTime]
,e.[timedataretrieval] AS [DataRetrievalTime]
,e.[timeprocessing] AS [ProcessingTime]
,e.[timerendering] AS [RenderingTime]
,COALESCE([AdditionalInfo].value( '(/AdditionalInfo/RdceSnapshotGenerationTime//node())[1]', 'int'),0) AS [RDCESnapshotGenTime]
,e.*
FROM [executionlog2] e

There is column Parameters. Which looks in my case following:
AX_PartitionKey=initial&AX_UserContext:isnull=true&AX_RenderingCulture=en-us&AX_CompanyName=CEU&FormLetterRecordId=0&PrintCopyOriginal=Original&RecordId=22565421785&LedgerJournalTransRecordId=0&AX_ReportContext=?RunOnClient%3D1%26PrintMediumType%3DScreen&AX_RdpPreProcessedId=5637144577&SalesInvoiceDS_isTaxInvoice=False&SalesInvoiceDS_TaxInvoiceItemType=Item&SalesInvoiceDS_CountryRegionISOCode=US&DocumentTitle=Invoice&DocumentTitleSequel:isnull=true&IdentificationText:isnull=true&InstanceType=Original&InvoiceInstanceText:isnull=true&CustInvoiceDuplicateRecId=0&UserName:isnull=true&SalesInvoiceDS_AgentAddress_TH:isnull=true&SalesInvoiceDS_AgentId_TH:isnull=true&SalesInvoiceDS_AgentName_TH:isnull=true&IsUnrealizedVATEnabled_TH=False&SalesInvoiceDS_Location=None&SalesInvoiceDS_MiscText:isnull=true&SalesInvoiceDS_PrintHeader:isnull=true&SalesInvoiceDS_ProdType=All&SalesInvoiceDS_TaxBranchCode_TH:isnull=true&SalesInvoiceDS_TaxBranchName_TH:isnull=true

What we do is:
Restart Reporting services – this step can be removed
Open internet explorer
Set IE window to be not visible
Navigate in SalesInvoice report with dummy parameters (here I pause the script for 3 minutes to make sure the report will finish rendering)
Close IE.

Stop-Service "SQL Server Reporting Services (MSSQLSERVER)"
Start-Service "SQL Server Reporting Services (MSSQLSERVER)"

# based on http://msdn.microsoft.com/en-us/library/ms155391.aspx)

[string] $url = "http://localhost/ReportServer/Pages/ReportViewer.aspx?%2fDynamicsAX%2fStaticReports%2fen-US%2fSalesInvoice.Report&AX_PartitionKey=initial&AX_UserContext:isnull=true&AX_RenderingCulture=en-us&AX_CompanyName=CEU&FormLetterRecordId=0&PrintCopyOriginal=Original&RecordId=22565421785&LedgerJournalTransRecordId=0&AX_ReportContext=?RunOnClient%3D1%26PrintMediumType%3DScreen&AX_RdpPreProcessedId=5637144577&SalesInvoiceDS_isTaxInvoice=False&SalesInvoiceDS_TaxInvoiceItemType=Item&SalesInvoiceDS_CountryRegionISOCode=US&DocumentTitle=Invoice&DocumentTitleSequel:isnull=true&IdentificationText:isnull=true&InstanceType=Original&InvoiceInstanceText:isnull=true&CustInvoiceDuplicateRecId=0&UserName:isnull=true&SalesInvoiceDS_AgentAddress_TH:isnull=true&SalesInvoiceDS_AgentId_TH:isnull=true&SalesInvoiceDS_AgentName_TH:isnull=true&IsUnrealizedVATEnabled_TH=False&SalesInvoiceDS_Location=None&SalesInvoiceDS_MiscText:isnull=true&SalesInvoiceDS_PrintHeader:isnull=true&SalesInvoiceDS_ProdType=All&SalesInvoiceDS_TaxBranchCode_TH:isnull=true&SalesInvoiceDS_TaxBranchName_TH:isnull=true&rs:Command=Render";

#documentation of InternetExplorer.Application: http://msdn.microsoft.com/en-us/library/aa752084(v=vs.85).aspx

$ie = New-Object -comObject InternetExplorer.Application;
$ie.navigate2($url);
$ie.visible = $false;
# sleep for 3 minutes to make sure the call is properly completed
Start-Sleep -s 180;

$ie.Quit();

Thing to remember is in case of using static reports:http://technet.microsoft.com/en-us/library/hh496446.aspx
In this case we create directory StaticReports under DynamicsAx directory and there we have for each language separated report.
That makes reports better performed as we safe couple of trips to Metadata service as we do not run in this case AX rendering extension, but we have RDL ready to be run (see image below) but then if we want to warm up the report we have to make sure we warm up each language version we want to use. (ie http://localhost/ReportServer/Pages/ReportViewer.aspx?%2fDynamicsAX%2fStaticReports%2fde-de%2fSalesInvoice.Report for German)
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