Author |
Message |
Marpesia
Newbie
Joined: 07 Jan 2015
Online Status: Offline
Posts: 4
|
Topic: Crystal Reports combining Command and db together Posted: 08 Jan 2015 at 10:07am |
Hi,
I'm new at Crystal Reports and I need to make a report where I need to combine Command and direct db together. Database is called mCallEnd.
Can you please tell me how can I do that?
How can I integrate mCallEnd in the SQL query in Command so I can have all fields and formulas from mCallEnd in Command?
Thank you!
Edited by Marpesia - 08 Jan 2015 at 10:07am
|
IP Logged |
|
lockwelle
Moderator
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
|
Posted: 08 Jan 2015 at 12:14pm |
you can access the datatables in the command, but I am not sure about functions.
The simplest approach that I can think of is to write you command, then add a table from the database and link the 2 together.
Add the filtering criteria in the Report/Formulas/Record selection
HTH
|
IP Logged |
|
Marpesia
Newbie
Joined: 07 Jan 2015
Online Status: Offline
Posts: 4
|
Posted: 26 Feb 2015 at 7:34am |
Thank you for your answer. Well, it's complicated for me because I would like to do that in already existing Command from one report.
I have a custom report with the custom fields. I would like to add mCallEnd db into that report (Command). Because I need couple of fields from mCallEnd db to make my report. I was thinking just to modify already existing Command by adding mCallEnd db and then I would have all fields to continue building the report.
The original Command is very big and complicated.
I put it on this link: http://pastebin.com/M4UykQAm
And report I would like to make looks like this: http://imgur.com/IjXjoAF
To make Total Billable Minutes formula I need to sum: SecTalkTime, CheckTalkTime, NonLiveTalkTime, SecHoldTime, CheckHoldTime, NonLiveHoldTime, SecDiscTime, CheckDiscTime, NonLiveDiscTime from Command.
Thanks in advance!
Edited by Marpesia - 26 Feb 2015 at 7:59am
|
IP Logged |
|
kevlray
Admin Group
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
|
Posted: 26 Feb 2015 at 10:23am |
I looked at your query real quick and even though it is long, it does not look very complex. You mentioned that you need to add another database (not just a table) to the query. I know that there is a way in MS-SQL (not sure about other databases). The main thing is you need to know how tables are to be joined (it appears that a master table variable is created with a field called account). But I am not sure how this new database would tie into any or all the tables in the query.
|
IP Logged |
|
Marpesia
Newbie
Joined: 07 Jan 2015
Online Status: Offline
Posts: 4
|
Posted: 26 Feb 2015 at 11:51am |
Hi,
well if that will help, I don't need the whole db then. I only need couple of tables from mCallEnd db to make the first 5 columns of that report. I don't know how to join those tables. INNER JOIN maybe? Thanks for your help!
Edited by Marpesia - 26 Feb 2015 at 11:59am
|
IP Logged |
|
Marpesia
Newbie
Joined: 07 Jan 2015
Online Status: Offline
Posts: 4
|
Posted: 11 May 2015 at 5:29am |
I still couldn't figure out my problem, so if anyone else has some ideas on how to make this report, it would be appreciated.
Thanks!
Edited by Marpesia - 11 May 2015 at 5:33am
|
IP Logged |
|
|