Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hiding a subreport/Do I really need it? CRX1

Status
Not open for further replies.

Hodge4ever

Technical User
Feb 17, 2009
1
GB
I have used a subreport to pass a value to the main report. After reading some of the threads I have not got it to pass the correct value. Originally I had it in the wrong section. The report is grouped by part number. I have hidden the detail and put the fields in the GF. The subreport is in the GH.I want to export the report as a data only Excel. I have tried to make it as small as possible, locking the size and position and unchecking the can grow box.

I have now realised that it will still be on the report. Is there a way to hide it without suppressing it so that the value is not passed? This leads me to question if I need a subreport.

Below is a very simple example of what I am trying to do. There are more fields to the report but I hope this shows the basic premise.


Conversion Table
---------------------


PartNo UOM Val
-------- ------- ----
1 KG 1
1 MM 100
1 M 10
2 CM 5
2 MM 15


Sales Table
-------------

OrderNo PartNo Qty Date
----------- -------- ---- -------------
1 1 10 01/01/2009
2 1 100 15/01/2009
3 1 15 01/02/2009
4 2 5 01/01/2009
5 2 7 05/01/2009
6 2 52 01/02/2009
7 2 5 17/02/2009
8 3 1 01/01/2009
9 3 17 01/01/2009
10 3 3 01/02/2009

Report
--------

PartNo Val Jan 09 Feb 09
-------- ---- ------- --------
1 1 110 15
2 0 12 57
3 0 18 3


If I put Conversion Table = “KG” in the selection criteria I lose sales lines that have a part that does not have “KG” in the sales. If I do not add this line I get duplicated sales lines so my monthly running totals will be out. The ‘Val’ will not be the same so I cannot limit to say ‘KG’ or ‘MM’.

Have I missed an obvious solution?
 
This is not very clear, but from your example, it appears you want to show ALL sales activity, but in the val column, show the val for a particular UOM if the UOM is present. If that is the case, you could just link the two tables by part number, add group #1 on part number and then group #2 on UOM, and use running totals that evaluate on change of group #2. Place the rts in the group #1 footer and suppress the other sections.

For the val, you could create a parameter {?UOM}, and then create a formula {@UOMval} in the field explorer:

if {table.UOM} = {?UOM} then {table.val}

Then insert a maximum on this formula to use in the val column in the group #1 footer.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top