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!

Querying external table not linked to other tables

Status
Not open for further replies.

DannyPole

Technical User
Apr 15, 2004
3
ZA
Sir/madam,

Using Crystal 2008

I am trying to query an external table which is not linked to my other tables for budget information. In crystal 9 it was easy to write a SQL(.....) statement in the formula but with this 2008, i cant get around it.
I can link the Budget table with the other table but the budget date is Date Only and the relevant table has DateTime.

Any help will be appreciated.

Thanking you in advance:

Danny Pole
 
You can convert datetime to date in Crystal using a formula.

Date(your datetime field)

Ian
 
If you are saying you need to link the tables on the date field, then you can either use a subreport where you use a conversion formula as Ian suggests to the date in the other table as one of the subreport links, or you could use a command as your sole datasource for the report, where you convert the datetime to a date and use it to link in the FROM clause.

-LB
 
Dear lbass and IanWaterman,

Thanks very much for the contribution.

1. If i have to create a subreport, then i will have 150 subreports because of different formulas getting different information from the budget table. The report will take forever to run.

2. I was trying to explore the Command, i am not sure how it will help me or maybe How it works.

3. I was thinking that the SQL statement within the formula or SQL expression might work. [I need a guidance about the SQL syntax - SELECT on crystal]. I want to convert this following statement to crystal - "SELECT ANNUAL_BUDGET.TCH_PERCENT from ANNUAL_BUDGET, SAMPLE where ANNUAL_BUDGET.BUDGET_DATE = SAMPLE.DATE_COMPLETED"

NB: I need to populate different cells on a table with different information coming from budget table.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top