# Reports

**URL:** <https://www.dynamicsuser.net/t/reports/33929>\
**Category:** Developer Forum\
**Created:** [November 14, 2011, 11:34am UTC](https://www.dynamicsuser.net/t/reports/33929 "2011-11-14T11:34:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vardhan](https://avatars.discourse-cdn.com/v4/letter/v/ebca7d/32.png) [@vardhan](https://www.dynamicsuser.net/u/vardhan)\
**Post date:** [November 14, 2011, 11:34am UTC](https://www.dynamicsuser.net/t/reports/33929/1 "2011-11-14T11:34:07Z")

</div>

in reports i want to compare two tables and fetch the latest trans date how can i do it

---

<div class="post-metadata">

**Author:** ![Jason8077](https://avatars.discourse-cdn.com/v4/letter/j/e47c2d/32.png) [@Jason8077](https://www.dynamicsuser.net/u/Jason8077)\
**Post date:** [November 14, 2011, 3:24pm UTC](https://www.dynamicsuser.net/t/reports/33929/2 "2011-11-14T15:24:57Z")

</div>

which two tables are you talking about? Do you have Atlas XL installed?

---

<div class="post-metadata">

**Author:** ![EnriqueKevin06](https://avatars.discourse-cdn.com/v4/letter/e/2acd7d/32.png) [@EnriqueKevin06](https://www.dynamicsuser.net/u/EnriqueKevin06)\
**Post date:** [November 15, 2011, 6:48am UTC](https://www.dynamicsuser.net/t/reports/33929/3 "2011-11-15T06:48:05Z")

</div>

What are the fields are there in the two table?

What is the relation?

In what scenario, you want to fetch the data?

---

<div class="post-metadata">

**Author:** ![EnriqueKevin06](https://avatars.discourse-cdn.com/v4/letter/e/2acd7d/32.png) [@EnriqueKevin06](https://www.dynamicsuser.net/u/EnriqueKevin06)\
**Post date:** [November 15, 2011, 6:49am UTC](https://www.dynamicsuser.net/t/reports/33929/4 "2011-11-15T06:49:37Z")

</div>

Hi Shuheng,

What is Atlas Xl and why we need that in Ax…

---

<div class="post-metadata">

**Author:** ![Jason8077](https://avatars.discourse-cdn.com/v4/letter/j/e47c2d/32.png) [@Jason8077](https://www.dynamicsuser.net/u/Jason8077)\
**Post date:** [November 15, 2011, 3:26pm UTC](https://www.dynamicsuser.net/t/reports/33929/5 "2011-11-15T15:26:02Z")

</div>

Atlas XL can make your AX life easier when joining tables or exporting reports.

[http://www.atlasxl.com.au/Globeportal/1home.aspx](http://www.atlasxl.com.au/Globeportal/1home.aspx)

---

<div class="post-metadata">

**Author:** ![EnriqueKevin06](https://avatars.discourse-cdn.com/v4/letter/e/2acd7d/32.png) [@EnriqueKevin06](https://www.dynamicsuser.net/u/EnriqueKevin06)\
**Post date:** [November 19, 2011, 1:57pm UTC](https://www.dynamicsuser.net/t/reports/33929/6 "2011-11-19T13:57:23Z")

</div>

Thanks buddy…🙂

---

<div class="post-metadata">

**Author:** ![Yesh\_Fighting\_wit\_AX](https://avatars.discourse-cdn.com/v4/letter/y/aeb1de/32.png) [@Yesh\_Fighting\_wit\_AX](https://www.dynamicsuser.net/u/Yesh_Fighting_wit_AX)\
**Post date:** [November 21, 2011, 10:50am UTC](https://www.dynamicsuser.net/t/reports/33929/7 "2011-11-21T10:50:45Z")

</div>

Go through this code and try to implement your logic,

static void comparision\_of\_dates(Args \_args)  
{  
Transdate x,y;  
Container con;  
str test,\_date2;  
;  
x = 31\12\2010;  
y = 30\11\2010;

test = date2str(x,123,2,-1,2,-1,4);  
\_date2 = date2str(y,123,2,-1,2,-1,4);

con = conins(con,1,substr(test,1,2));  
con = conins(con,2,substr(test,4,2));  
con = conins(con,3,substr(test,7,4));  
con = conins(con,4,substr(\_date2,1,2));  
con = conins(con,5,substr(\_date2,4,2));  
con = conins(con,6,substr(\_date2,7,4));

if((conpeek(con,3))\>(conpeek(con,6)))  
{  
info(strfmt(“The greater date is %1”,test));  
}  
else if((conpeek(con,3))==(conpeek(con,6)))  
{  
if((conpeek(con,2))\>(conpeek(con,5)))  
{  
info(strfmt(“The greater date is %1”,test));  
}  
else if((conpeek(con,2))==(conpeek(con,5)))  
{  
if((conpeek(con,1))\>(conpeek(con,4)))  
{  
info(strfmt(“The greater date is %1”,test));  
}  
else  
{  
info(strfmt(“The greater date is %1”,\_date2));  
}  
}  
else  
{  
info(strfmt(“The greater date is %1”,\_date2));  
}  
}  
else  
{  
info(strfmt(“The greater date is %1”,\_date2));  
}

}
