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!

I'm new to this and need help on high level.

Status
Not open for further replies.

awegrzyn

Programmer
Mar 6, 2003
2
US
I work for a telecomunication company and the assignment is to produce a report. The select statement for that report is very complicated. I don't know if I can do the following:

1. create a stored procedure that will return me list of study areas. (stady_area_id, study_area_name) etc.

2. create a formula for each study_area_id select the state that the study area is in.

This is just the example, it's much more completed, but my basic question is: Can I create forumulas (subqueries) for the stored procedure and query the values in the report for each study_area_id or I have to put everthing in a stored procedure.




 
First, Formulas are not subqueries.

1. create a stored procedure that will return me list of study areas. (stady_area_id, study_area_name) etc.

Sure.

2. create a formula for each study_area_id select the state that the study area is in.

If you construct a SP to list the study areas, you should return the State column, and then you have that data.

You'll get better results if you post example data, expected output, version of Crystal and the database.

-k
 
Hey,

I'm using 8.0 version. I know I can get the name of the study area, but that was just the example. YOu have no idea how complecated is the data at my company, and how we count how much you pay for your phone. But you answered one of my questions (formulas are not subquries). Did you mean they can't query the database? I assume they can't.
Is there a way then to do somthing like I'm doing. Let's assume it's impossible to query the data in one stored procedure.
 
You can obtain all your base data from the database in your stored procedure, and derive additional information where possible using formulas, which do not subsequently hit the database.

Virtually anything is possible with a stored procedure and Crystal reports. But, you pointedly remark that we 'have no idea' of the standard of data you have to work with, or even what you're trying to do with it, so it's a little bit difficult to determine exactly what it is that you need to hear.

Naith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top