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!

Adding to Total

Status
Not open for further replies.

mtownbound

Technical User
Jan 28, 2002
293
US
I have 50 entries in my current database and 100 from my archived offline database. To capture the total number of entries, my formula is:

//#Total Entries
{new_entries}+100

This returns the correct amount of total entries, but my goal is to add the 100 entries to a bar chart.

For example:

Current Count of Basketball Championships
Lakers 20
Bulls 30


Archived Offline Database
Celtics 75
Lakers 25

I can't import the archived entries into the new database, but I still need to show the Lakers total of 45 in a bar chart.

Any ideas?

 

Depending on your backend database, you could combine the data in a command object (or a database view, or stored procedure):

select * from yourserver.livedatabase

union all

select * from yourserver.archivedatabase


You'd get multiple records for some teams, so you'd have to sum them in a group.

In a few weeks it will look like this:

Celtics 75
Lakers 45
Bulls 30
Thunder 1

 
Thanks for the reply. I was trying to steer away from accomplishing this on the backend, but may be the only way.


Grizzlies fan, so it hurts to say, but you may be right with your prediction :)
 

Don't forget you can paste the query into a command object within CR so there is nothing created on the server.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top