Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

summing totals dynamically in colums and rows..

hi all,

I have a Orocle Database table with the following struture.

ShopNumber ShopName ShopItem NumberSold Expired Total initial stock

00609001....' K1................ Fanta........ 176............... 4................... 500

00609001....' K1................ Coke........ 156............... 2...................500

00609001....' K1................ Sprite........ 134............... 1................... 500

00609004....' K2................ Fanta........ 45............... 4................... 500

00609004....' K2................ Coke........ 56............... 5................... 500

00609004....' K2................ Sprite........ 78............... 5................... 500

I would like to present the data in Crystal reports in the following format..

ShopNumber initial stock Fanta(F) Coke (C) Sprite (S) expired(e) Total(Fcs+e)

00609001..... 1500............. 176..........156..........134............7................473

00609004..... 1500............. 45............56...........78............14................193

inital stock is a total of all the drinks in a particular shop.the expired amount is a total of all the expired drinks in a particular shop.

The types of drinks can increase or reduce, its dynamic. the same applies to the shops.. we can have more shops. i have tried to use a cross tab, but the cross tab is rigid as one can not add a field which is not directly related to a drink type(eg expired amounts which are totals)..

I would appreciate if i could be helped. thanks in advance..

Former Member
Former Member replied

You might be able to use a standard cross tab.

Create a formula for the columns, not sure how your data is structured, but some how you will need to differentiate between stock and expired, and combine all expired into a single column.

It might be better to do all this in a SQL command and then report off that.

Ian

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question