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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can 2 data source data be combine in one formula like a union effect?

Status
Not open for further replies.

ridhirao22

Programmer
Aug 27, 2010
140
US
Hi,

Using CR 2008, Oracle 11g.
We are using 2 different sources to get last week end information.

We have brand-1 coming from source1 and brand-2 coming from source2
Will I have to use 2 subreports or can I do with one report and group data to display both brands one after the other
Report should look like

Brand-1
Sat #ords $tot
Sun #ords $tot
Brand-2
Sat #ords $tot
Sun #ords $tot


I am trying to use formula like @brand and group by it, but it doesn’t work with both brands only one of them is displayed (which evr is first listed in formula)

If command_source1.brand = ‘B1’ then ‘Brand-1’
Else if command_source2.brand = ‘B2’ then ‘Brand-2’

TIA,
RR
 
YOu will need to build a union command. First you will need to establish a link from Source1 database to source 2 DB
Then build a Union query on Source one with the UNion query pointing at source 2.
It will look somethning like

Select * from table1
Union all
Select * from Source2DB.table2

Ian
 
Thank you Ian.
Can this be done in CR with the DB link in Backend on databases?

Thanks
RR
 
I have done it on both oracle abd SQL server. Once the link is in place it does not matter if the query is created on a SQL tool or Crystal.

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top