Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2 data sources

Status
Not open for further replies.

ddouble

Technical User
May 21, 2010
2
US
I am working with CR2008 right now.

I basically have 2 seperate data sources, one contains a list of credits of multiple types and amounts. The other simply contains a list of 1 particular type of credit (not found in the first source).

I am trying to aggregate these together and use the charting tools in Crystal to show the total $ amount of credits, broken out by the category each month, but I am stuck.

Thought about creating a subreport for the second data source with a number of shared variables and passing them over, but there is nowhere in the main report where I can pass those numbers to that the charting tools will recognize.

I tried pulling both sources into 1 report with no linking, and using a few formulas in detail a and detail b that would get them to have the same types of totals and category, but Crystal ties the detail a and detail b together as 1 record.

Any suggestions would be greatly appreciated.

just to provide an example:

source 1
record 1 = 1/1/2010 reason = reimbursement, $25.00
record 2 = 1/1/2010 reason = product return $20.00

source 2
record 1 = 1/1/2010 reason = unhappy cust. $75.00
record 2= 1/5/2010 reason = unhappy cust. $35.00

thanks for any suggestions!
 
Depending upon the datasources and the fields you are working with, you might be able to use a command that essentially merges the data from the two sources:

select 'table1' as whichtable, table1.cramt, table1.type
from table1
union all
select 'table2' as whichtable, table2.cramt, null
from table2

You could use {command.whichtable} to distinguish the two sources if necessary.

"Add command" is above your table list in the database expert.

-LB
 
thanks for getting back to me lbass

Unfortunately, the option for 'add command' is not available (grayed out) on either data source in the Database Expert.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top