[SysEntryPointAttribute]
public void ProcessReport()
{
AssetTrans assettrans;
AssetGroup assetgroup;
AssetTable assettable;
AssetBook assetbook;
AssetSumCalc_Trans assetsumcalc;
TransDate periode;
AssetListFixedActiveContract contract= this.parmDataContract();
periode = contract.parmperiode();
if (periode == dateNull())
{periode = systemDateGet();}
while select assetgroup
{
tmp.clear();
select sum(AmountCur) from assettrans where assettrans.AmountCur
&& assettrans.AssetGroup == assetgroup.GroupId
&& assettrans.TransType == AssetTransType::Depreciation
&& assettrans.TransDate == periode;
tmp.AmountCur = assettrans.AmountCur;
}
kranthi
February 21, 2017, 8:05am
2
How to get in month not date with mthofYr from TransDate to show AmountCur from AssetTrans
This is not clear. Can you please explain?
i make a report to show amountcur from assetgroup where assettrans.assetgroup== assetgroup.groupid
with condition
&& assettrans.TransType == AssetTransType::Depreciation
&& assettrans.TransDate == periode;
------BUT------
operand of mthofyr is integer and i want to get only month from transdate which operand is date
please help
thank you so much
kranthi
February 21, 2017, 8:58am
4
You mean the start date and end date of a month? If so this has been discussed here,
dynamicsuser.net/…/class-method-transdate–1-month
@Kranthi
Sorry, the page you were looking for in this blog does not exist.
Sorry Kranthi
i want not to show about int or date
but i want to get amountcur where the parameter is transdate
but the transdate is so detail to show record in date
and i want to get amountcur from transdate which is full of month from transdate
please help
thank you so much
kranthi
February 21, 2017, 9:09am
6
thanks @kranthi
finally i solve about this case
[SysEntryPointAttribute]
public void ProcessReport()
{
//deklarasi table
AssetTrans assettrans;
AssetGroup assetgroup;
AssetTable assettable;
AssetBook assetbook;
AssetSumCalc_Trans assetsumcalc;
StartDate startdate;
EndDate enddate;
TransDate periode;
AssetListFixedActiveContract contract= this.parmDataContract();
periode = contract.parmperiode();
startdate = mkDate(1, mthOfYr(periode), year(periode));
enddate = endmth(periode);
if (periode == dateNull())
{periode = systemDateGet();}
while select assetgroup
{
tmp.clear();
select sum(AmountCur) from assettrans where assettrans.AmountCur
&& assettrans.AssetGroup == assetgroup.GroupId
&& assettrans.TransType == AssetTransType::Depreciation
&& assettrans.TransDate >= startdate
&& assettrans.TransDate <= enddate;
tmp.AmountCur = assettrans.AmountCur;
tmp.insert();
}
}
kranthi
February 21, 2017, 10:58am
8
If any reply has helped you, please don’t forget to mark it as verified (by clicking this helped me).