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 i put a sql query in a formula?

Status
Not open for further replies.

uksub

Programmer
Jun 15, 2003
51
US
can i put a sql query in a formula?

select distinct rname
from glsystem
where company = ?subcompany
 
No. Why would you want to?

Perhaps if you describe what you have and what you want someone can pose a reasonable solution.

-k
 
hi
well theres 2 way of doing this.
1. create a view or
2. use your select expert and {company} is equal to
{?subcompany}
create a group for comapny and format section suppress if duplicated.

cheers

pgtek
 
well the thing is 1) i need to read the database twice. first time grab info for the parent record. then with the subcompany field from the parent record.. go back and read the database to grab the subcompany info. i guess i just need to do a sub-report. i was just wondering if there was another way of doin this.

thanx
 
hi
i see here id what i do if i have to self reference the same table

create 2 view from your store procedure
then use these view in your report since you cant link a store procedure.
1 view name company
and the other SubComp_info
link your first view to the scond on the sub company number
there you will be able to extract the sub company info base on your link to the first view
hope this helps you

cheers

pgtek
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top