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!

Having totals that aren't directly linked to datasource

Status
Not open for further replies.

SonOfZeus

Programmer
Mar 6, 2002
53
CA
I have 2 views in SQL Server I access through ODBC within Crystal Reports. One view takes a total count of vehicles within the organization, the second takes the daily usage of each vehicle. On the report I want to figure out percent utilization of the vehicles, but due to the fact on organization may not have any work one day, I can't use the sum function. Thus the second view that simply has the value 55 in it's result, this being the total # of vehicles. Crystal won't allow me to use this on the report, any ideas?
 
If you're trying to use a table that might not have a value for a day (null value), which could throw the calculations off, I suggest using the IFNULL function (returns a boolean) to put a "0" in the summary if the value for a certain truck is null.
I say this because as a newbie at Crystal Decisions, I had a training exercise similar to this and it almost drove me crazy this week. Good luck!
 
Thanks for the help. I found Andrews' solution of a subreport worked wonders. Already have implemented in a couple of the main reports I do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top