vb.net - what's the best approach to do this in crystal report? -
what's best approach in crystal report ? got 3 tables main table, sub table main , 1 item table sub of sub..it goes this..
maintable - stored main accounts. idkey accnt amount ------------------------------------ 01 construction 1000.00 02 maintenance 500.00 subtable - table sub account main table stored. - idkey table , main table equal. idkey idsub subaccnt amount ----------------------------------------- 01 01 watchtower 800.00 01 02 level 9 wall 200.00 02 03 monthly maintenance 500.00 itemtable - table items of sub table stored. - idsub of table , subtable equal. idsub items cost ----------------------------------- 01 cement 100.00 01 steel 100.00 01 labor 400.00 02 rocks 100.00 02 labor 100.00 03 labor 500.00
now want report this..
how ? need sub-report ? , how ? , using crystal report , vb.net..glad help..tnx in advance :)
this query might u out
select mt.accnt,st.subaccnt, st.amount,sum(it.cost) maintable mt inner join subtable st on st.idkey=mt.idkey inner join itemtable on it.idsub=st.idsub group mt.accnt,st.subaccnt, st.amount
subreport not required , balance can achive in query or can in report itself
add group mt.accnt , add total same.
Comments
Post a Comment