Hello !
perhaps this might be a n00b markaby question but...we are finding some
issues to display records with a simple space inside a view (both with
sqlite, mysql or kirbybase so it is not db related).
E.g. to have a formatted (with a simple space between the records so
nothing fancy like Stock Name Apple Ticker AAPL number of
stocks 10 bought at 580.13$ on 2012-04-17 Total position 5801.3)
list I have to do something like this
def index
kirby = KirbyBase.new
stocks_tbl = kirby.get_table(:stocks)
results
stocks_tbl.select(:name,:ticker,:tradeprice,:tradedate,:quantity,:totalposition,:recno).sort(+:totalposition)
for result in results
text ''Stock Name  ''
text result.name
text '' ''
text ''Ticker  ''
text result.ticker
text '' ''
text ''number of stocks''
text '' ''
text result.quantity
text '' ''
text ''bought at  ''
text result.tradeprice
text ''$  ''
text ''on  ''
text result.tradedate
text '' ''
text ''Total position''
text '' ''
text result.totalposition
br
Now I am sure that there is perhaps a better way to do it ? :)
Thanks in advance
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/camping-list/attachments/20120417/6c00f8c5/attachment.html>