If the address (and private key) are in the wallet, there are RPC calls to provide this info. For a paper wallet, you wouldn't have the address (and private key) in your wallet, so those calls won't help you in that instance.
The Bitcoin-Qt client (v0.7 and above) provides Raw Transactions (getrawtransaction, decoderawtransaction) that will give you this information but you need to know the transaction hash.
- http://en.bitcoin.it/wiki/Raw_Transactions
You can build a database with all the transactions by processing the transactions from the blocks of the longest chain (getblockhash and getblock) plus the valid but unconfirmed transactions in the memory pool (listsinceblock), but that is not a trivial task. [Edit: There is also the monitortx patch that will help with this.]
There are other tools that can help as well. Armory provides easy access to blockchain data, see the "Extras" folder. Also libBitcoin might provide this to you as might ABE blockchain explorer source. Or now there is libccoin even that might be useful:
- https://bitcointalksearch.org/topic/announce-picocoin-and-libccoin-c-based-bitcoin-library-and-client-128055
If you are willing to use the Block Explorer to obtain the transaction hashes but then use your local bitcoind to obtain the amounts that might be a hybrid solution that works for you -- depending on the reasons you didn't want to use a hosted blockchain service.
There are other services providing this information as well:
- http://btcbalance.net
- http://bitcoinmonitor.net
- http://blockchain.info/address-balance-sheet