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!

Crystal 8.5 add command?

Status
Not open for further replies.

beltmanjr

Technical User
Oct 29, 2007
333
NL
I'm just wondering if crystal 8.5 already has the add command option as I see in XI user the database expert.

If it does, where can I find it?

Many thanks
JR
 
Not directly. However, when you View SQL in 8.5 you have the option to edit the sql. I haven't actually added SQL here, but I've tweaked the existing SQL (to remove the schema owner so that we could more easily move reports from one environment to another where the schema owner was different.)

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
In 8.5 you can edit the where clause of the database->show SQL query area, but not the select or from clause--unless you use a workaround with union all statements, where you set the existing where clause to 1 = 0 and then add a union with new select, from, and where clauses, but of course you then must match each field by order position and datatype according to the initial query.

You have the option of using SQL expressions in 8.5 for subqueries, too.

-LB
 
You have the option of using SQL expressions in 8.5 for subqueries, too.
You do? Where and how? Could I indeed run a complete subquery with select * from table etc?
 
I did quite a lot of SQL in Crystal 8.5 before we upgraded to Crystal 10. Whereas 10 will let you paste the code directly in Databased Expert, Crystal 8.5 needed the Crystal SQL Designer which created something you then attached to the cystal. Also you could'y use it with table fields, I had to use subreports for some functions.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Well, no, you can't do that, since the SQL expression can only return one value per execution. But you could return summaries to the report by using a SQL expression like this:

(
select sum(A.`amt`)
from table A
where A.`ID` = table.`ID`
)

This would return the sum of your amount field per ID group.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top