Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Open & History Post Reply Post New Topic
Author Message
Kitty1
Senior Member
Senior Member
Avatar

Joined: 14 Apr 2010
Online Status: Offline
Posts: 159
Quote Kitty1 Replybullet 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 IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Apr 2016 at 9:57am
sounds like you are asking about a UNION of the two tables?
IP IP Logged
Kitty1
Senior Member
Senior Member
Avatar

Joined: 14 Apr 2010
Online Status: Offline
Posts: 159
Quote Kitty1 Replybullet 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 IP Logged
Kitty1
Senior Member
Senior Member
Avatar

Joined: 14 Apr 2010
Online Status: Offline
Posts: 159
Quote Kitty1 Replybullet 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 IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet 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 IP Logged
Kitty1
Senior Member
Senior Member
Avatar

Joined: 14 Apr 2010
Online Status: Offline
Posts: 159
Quote Kitty1 Replybullet 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 IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet 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 IP Logged
Kitty1
Senior Member
Senior Member
Avatar

Joined: 14 Apr 2010
Online Status: Offline
Posts: 159
Quote Kitty1 Replybullet Posted: 22 Apr 2016 at 9:08am
Thanks so much for your help. Have a great weekend!
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.