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

is this possible?

Status
Not open for further replies.

yehong

Programmer
Sep 22, 2003
291
US
I want to sort the data of one table A based upon the data of another table B. Table B has no physical link to Table A to affect its data. All I want is to pass the sql from the report like:
Select * from Table A
Where TableB.Filed='S1'

Then I have a dynamic sort formula in the report that uses 'S1' value and passes it to TableA.S1 field. TableA has 5 fields S1,S2,S3,S4,S5.


//@Sortby
If TableB.Field='S1' Then
TableA.S1
If TableB.Field='S2' Then
TableA.S2....


Any idea if that is possible?
I am using CR8.5 with SQL Server.
Thanks,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top