Group in subreport

S

Sunny

We have 3 area offices and in each area office we have many stock rooms. I
have designed Inventory report with subreport.

Main report is grouped by Area Office and then Item#. In Item header it
prints Item details (name, desc, etc...) and opening stock on given start
date. Nothing to be print in detail section. In Item Footer section it has
subreport (inventopry detail). and closing balance on given end date.

Subreport is grouped by Stock Room. On stock room header it prints details
of stock room and opening balance of given start date. On stock room footer
it prints closing balance of the item on given end date. In detail section
of subreport it prints incoming and outgoing stock.

I use same function to find opening balance of the item on Main report and
subreport with parameter. Like FindOpenBalance(ItemNo,Area,OnDate). But
when I use this function in subreport ItemNo always return empty value, not
referring anywhere. It prints stock details perfact, so there are some
inventory transactions. How do I refer ItemNo in Stock Room header to find
opening balance?

Sample Report:

Area 1
Item 1
Opening Bal : 100
Stock Place 1
Opening Bal : 60
New Stock
+ 10
Stock
-5

Stock Place 1 Closing Bal : 65
Stock Place 1
Opening Bal : 40
New Stock
+ 20

Stock Place 1 Closing Bal : 60

Total Closing Bal for Item 1: 125
Area 2
....
....
....
Area 3
....
....
....
 
S

SA

Sunny:

If the ItemNo is on the main report (as with any other control,) and it is
not on the subreport, then refer to a parent control like this:

Me.Parent!ItemNo
 
S

Sunny

ItemNo control is on both main and subreport. But somehow I can not refer
any control in vba code. Any other idea?
 
S

SA

Sunny:

Have you fully qualitied the reference to the control as in Me!ItemNo?

You might try aliasing the control name as in ItemNo1 and then refer to it
as Me!ItemNo1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top