Author |
Message |
Kitty1
Senior Member
Joined: 14 Apr 2010
Online Status: Offline
Posts: 159
|
Topic: Open & History Posted: 13 Apr 2016 at 9:40am |
Hi, I have two tables, one is AR History and one is AR Open items. I have a report that lists between specific dates. Is there a way to have both tables in my report, and pull from whichever one(s) the dates are in ? Thanks!
|
IP Logged |
|
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
|
Posted: 13 Apr 2016 at 9:57am |
sounds like you are asking about a UNION of the two tables?
|
IP Logged |
|
Kitty1
Senior Member
Joined: 14 Apr 2010
Online Status: Offline
Posts: 159
|
Posted: 13 Apr 2016 at 10:00am |
Thanks for your reply. That sounds like it, but I am not very advanced with Crystal, I use it from time to time, but not a lot. Would you be able to give me detailed instructions on how to do this ? I would really appreciate it!
Edited by Kitty1 - 13 Apr 2016 at 10:06am
|
IP Logged |
|
Kitty1
Senior Member
Joined: 14 Apr 2010
Online Status: Offline
Posts: 159
|
Posted: 13 Apr 2016 at 10:06am |
Thanks for your reply. That sounds like it, but I am not very advanced with Crystal, I use it from time to time, but not a lot. Would you be able to give me detailed instructions on how to do this ? I would really appreciate it!
|
IP Logged |
|
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
|
Posted: 13 Apr 2016 at 10:41am |
My guess is that the open items are moved to history when they are closed so all your data is basically the same.
If you are trying to "merge" these back together you could use a union in a command or a stored procedure
simple example of a command using parameter dates:
select column 1, column2 , column3
from ARhistory where arhistory.datefield between @start and @end
UNION
select column 1, column2 , column3
from ARopen where ARopen.datefield between @start and @end
Edited by DBlank - 13 Apr 2016 at 10:42am
|
IP Logged |
|
Kitty1
Senior Member
Joined: 14 Apr 2010
Online Status: Offline
Posts: 159
|
Posted: 14 Apr 2016 at 5:22am |
Hi, thanks for the reply. I'm not really sure how to do this, but i will give it a try!
|
IP Logged |
|
hilfy
Admin Group
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
|
Posted: 22 Apr 2016 at 9:05am |
For more information about using commands, see my blog post here: http://scn.sap.com/community/crystal-reports/blog/2015/04/01/best-practices-when-using-commands-with-crystal-reports
There are some tricks to getting it to work correctly.
Also, if you're not experienced at writing SQL, you will probably want to get someone who is to help you.
-Dell
|
|
IP Logged |
|
Kitty1
Senior Member
Joined: 14 Apr 2010
Online Status: Offline
Posts: 159
|
Posted: 22 Apr 2016 at 9:08am |
Thanks so much for your help. Have a great weekend!
|
IP Logged |
|
|