Friday 25 October 2013

find the range of query and display in to ssrs report

 this.queryRun().query().dataSourceTable(tableNum(<YourTableName>)).findRange(fieldNum(<YourTableName>, <Your_Division_FieldName>)).value()



ex:

queryRun.query().dataSourceTable(tableNum(PurchRFQTable)).findRange(fieldNum(PurchRFQTable, VendAccount)).value();



create one field in temporary table and assign in process report
as

     this.getReportParameters();
    //queryRun = new QueryRun(this.parmQuery());
    queryRun = new QueryRun(this.buildQuery(this.parmQuery(),FromDate,ToDate));
    VendEvaluationTmp.ParmVendAccount = queryRun.query().dataSourceTable(tableNum(PurchRFQTable)).findRange(fieldNum(PurchRFQTable, VendAccount)).value();//).this.queryRun().query().dataSourceTable(tableNum(PurchRFQTable)).findRange(fieldNum(PurchRFQTable, VendAccount)).value();
    while(queryRun.next())
    {







Tuesday 8 October 2013

LogisticsElectronicAddress phone ,fax details:

static void phonefax(Args _args)
{
    InventLocation inventLocation;
    InventSite inventSite;
    LogisticsEntityPostalAddressView logisticsEntityPostalAddressView;
    LogisticsLocation logisticsLocation;
    LogisticsElectronicAddress logisticsElectronicAddress;
    int64 siteid;
    select * from inventSite where inventSite.SiteId == "1";
    select * from logisticsEntityPostalAddressView where logisticsEntityPostalAddressView.Entity == inventSite.RecId;
                                               // && logisticsEntityPostalAddressView.IsPrimary == NoYes::Yes;
     //info(strFmt("%1",logisticsEntityPostalAddressView.Address));
    select * from logisticsLocation where logisticsLocation.RecId == logisticsEntityPostalAddressView.Location;
    siteid = logisticsLocation.RecId + 1;
     while select logisticsElectronicAddress where logisticsElectronicAddress.Location == siteid
                                                       && logisticsElectronicAddress.Type == 1//LogisticsElectronicAddressMethodType::Phone//1
     //                                                  && logisticsElectronicAddress.IsPrimary == NoYes::No//LogisticsElectronicAddressTypes::Phone
    {

    info(strFmt("%1 %2 %3",logisticsElectronicAddress.Type,logisticsElectronicAddress.LocatorExtension,logisticsElectronicAddress.Locator));
    info("hi");
    }
        info("bye");

}