|
adewitt
|
 |
« on: August 03, 2009, 11:36:18 AM » |
|
The report is a Totals Only Report. I have two break levels. The lower level is HTS.CODE, the higher is Shipment Number. The Shipment Number level is to print a work variable and performa page break. I don't have grand totals.
I can get the totals to print at the HTS.CODE Level, however, I can't get the work variable to print at the end of all the HTS.CODES for that Shipment #. I can get it to print after the first HTS.CODE total or at the very end of the report. I guess I don't understand how SB tracks total/ break levels. Is it 1) First Level 2) Second Level 3) Grand Total or is it 3)Second Level 2) First Level 1) Grand Total? Understand this might help me set up the right condition.
Hopes this makes sense.
|
|
|
|
|
Logged
|
|
|
|
precisonline
President/Chief Technologist
Administrator
Rock Star
    
Posts: 1532
|
 |
« Reply #1 on: August 03, 2009, 11:44:35 AM » |
|
I can't say I completely follow everything you're saying, but I believe I can answer the question. If your break fields are something like:
HTS.CODE SHIP.NUM
Then HTS.CODE would be break field #1 and SHIP.NUM would be break field #2. When the report is outputting, the ship num break will happen as the ship number changes while the HTS.CODE remains the same. Then when the HTS.CODE changes that break will occur. At the end of the details, the breaks get played in reverse order, so ship number, then hts code, then grand total.
Of course, it's all predicated on the sort fields being the same as the break fields. If you sort by HTS.CODE and SHIP.NUM it'll sort all of the HTS.CODE values first, and then SHIP.NUM within each HTS.CODE value.
I usually recommend people setup their break section(s) in reverse order, similar to how the report would appear at end of the report. So setup a subsection for your ship num break, then below this setup a section for the HTS.CODE break, then grand totals (if desired) below that.
Hope this helps! Please do post back with any additional questions you might have or solution once you have it worked out.
|
|
|
|
|
Logged
|
-Kevin Accidents "happen"; success, however, is planned and executed.
|
|
|
|
adewitt
|
 |
« Reply #2 on: August 03, 2009, 01:19:56 PM » |
|
You have it backwards (or maybe I explained it backwards). I can have one or more ship numbers. Wthin each ship number i can have one or more HTS Codes. When I am done with all my HTS.Codes for a Ship.NUM I want to print my Work Variable and then jump to the next page and print the HTS Codes for the next Ship Number. Below is a copy of the current report.
My conditional print for the HTS.CODE is: IF(@RV.BREAK.FLD < 2,2,0). My conditional print for the Export Exemption is: IF(@RV.BREAK.CNT >1,2,0) You can see where it's now printing and I want it after the 830250 line (right before the page break).
03 AUG 09 03:26PM EXPORT DOCUMENT Page 1 SOPR9635 ADMIN C.Manager Avante 9.5.4f Stylmark DEV.DATA Copied 08/01/09 Order Nbr: 682735 Rel: 1
Line HTS Code HTS Desc Nbr Item Desc Ship Qty Price Ext Price ---------- ----------------------------------- ---- ------------------------- -------- ---------- ---------- 760429 Aluminum Alloy Extrusion 19 14.11000 268.00 ***Export Exemption Section: Sec 30.37a 830242 Hardware kit, brackets, clips, 7 55.00000 385.00 end caps 830250 BRACKETS BASE METAL 18 6.00000 108.00
|
|
|
|
« Last Edit: August 03, 2009, 01:57:30 PM by adewitt »
|
Logged
|
|
|
|
precisonline
President/Chief Technologist
Administrator
Rock Star
    
Posts: 1532
|
 |
« Reply #3 on: August 03, 2009, 02:24:47 PM » |
|
Yeah, you're right; I was completely backwards. So based on this your sort and break fields should be:
Ship.Num HTS.CODE #1 #2
(not sure what the ship number field name is exactly, and you might have additional sort fields)
For the HTS.CODE conditional, I'd use: IF(@RV.BREAK.FLD = 2,0,n) For the ship number conditional, I'd use: IF(@RV.BREAK.FLD = 1,0,n)
In both of these, replace n with the number of lines in that subsection.
|
|
|
|
|
Logged
|
-Kevin Accidents "happen"; success, however, is planned and executed.
|
|
|
|
adewitt
|
 |
« Reply #4 on: August 03, 2009, 03:29:07 PM » |
|
Yeah, you're right; I was completely backwards. So based on this your sort and break fields should be:
Ship.Num HTS.CODE #1 #2
(not sure what the ship number field name is exactly, and you might have additional sort fields)
For the HTS.CODE conditional, I'd use: IF(@RV.BREAK.FLD = 2,0,n) For the ship number conditional, I'd use: IF(@RV.BREAK.FLD = 1,0,n)
In both of these, replace n with the number of lines in that subsection.
I'm getting the same results as pictured above. I also get the same results if I try this For the HTS.CODE conditional, I'd use: IF(@RV.BREAK.FLD # 2,2,0) For the ship number conditional, I'd use: IF(@RV.BREAK.FLD # 1,2,0) Here is my F6: ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄReport ParametersÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Multiple Records/page Y (N/Y/H) ³ ³ Description Source C (N/S/A/C) ³ ³ Output Device A (S/P/X/D/F/H/A) Allow HTML N (Y/N) ³ ³ Totals Only Y (Y/N/A) Align Forms N (Y/N) ³ ³ Two Pass Report N (Y/N) Send to PDF N (Y/N) ³ ³ Screen Window Co-ords ³ ³ Sort Fields S.SHIPTRNKEY S.HTS.CODE S.LI.NBR ³ ³ Break Fields S.SHIPTRNKEY(P S.HTS.CODE ³ ³ Selection Criteria S.PORT.NBR = "(@PORT)" ³ ³ Process At Start P:(@WORK<10> = '') ³ ³ Process After Read ³ ³ Process Before Break SOPP9635.4 ³ ³ Process After Break SOPP9635.5 ³ ³ Process At End ³ ³ Pages to Store 10 ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
|
|
|
|
|
Logged
|
|
|
|
precisonline
President/Chief Technologist
Administrator
Rock Star
    
Posts: 1532
|
 |
« Reply #5 on: August 03, 2009, 04:28:54 PM » |
|
Is the issue that the work value is wrong or that it's being shown in the wrong place? Can you paste in a text version of the /RD so we can see where the subsections and your conditionals are placed?
|
|
|
|
|
Logged
|
-Kevin Accidents "happen"; success, however, is planned and executed.
|
|
|
|
adewitt
|
 |
« Reply #6 on: August 04, 2009, 06:13:25 AM » |
|
Wrong Place. Should be at the end of the page, not after the first HTS total.
Report Definitions : SHIPTRN.LF1 SOPR9635 C000 R001 T1234567890123456789012345678901234567890123456789012345678901234567890123456 --------10--------20--------30--------40--------50--------60--------70------ 1|HC 2|HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 3| XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 4| Order Nbr: XXXXXXXX Rel: XX 5| 6| 7| Line 8|CHTS Code HTS Desc Nbr Item Desc ---------- ----------------------------------- ---- --------------------- 10|DXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXX XXXXXXXXXXXXXXXXXXXXX 11|D 12|BC 13|BXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 14|BC 15|B***Export Exemption Section: XXXXXXXXXXXXXXX 16| 17| 18| 19| F2-Save F4-Del F5-Field F6-Params F7-Trial F8-Move F9-Effects F10-Action
|
|
|
|
|
Logged
|
|
|
|
precisonline
President/Chief Technologist
Administrator
Rock Star
    
Posts: 1532
|
 |
« Reply #7 on: August 04, 2009, 07:17:35 AM » |
|
And you're absolutely certain that the ship number didn't change there? Assuming row 14 has the ship num conditional field it looks to me like there has been a change in the ship number. Is this (ship number) a normal data field?
|
|
|
|
|
Logged
|
-Kevin Accidents "happen"; success, however, is planned and executed.
|
|
|
|
adewitt
|
 |
« Reply #8 on: August 04, 2009, 07:32:09 AM » |
|
LIST SHIPTRN.LF1 @ID FMT '20L' S.SHIPTRNKEY S.HTS.CODE S.LI.NBR ID.SUPP 09:25:38 AUG 04 2009 1 SHIPTRN.LF1......... Shiptrn Key HTS Code Line Nbr 4*682735*1*002 682735*1 760429 002 4*682735*1*003 682735*1 760429 003 4*682735*1*001 682735*1 830250 001 4*682735*1*004 682735*1 830242 004 4*682735*1*005 682735*1 830242 005 5 records listed
|
|
|
|
|
Logged
|
|
|
|
precisonline
President/Chief Technologist
Administrator
Rock Star
    
Posts: 1532
|
 |
« Reply #9 on: August 04, 2009, 07:33:24 AM » |
|
Which of these fields is the ship number for purposes of this report?
|
|
|
|
|
Logged
|
-Kevin Accidents "happen"; success, however, is planned and executed.
|
|
|
|
adewitt
|
 |
« Reply #10 on: August 04, 2009, 07:45:42 AM » |
|
S.SHPTRNKEY
|
|
|
|
|
Logged
|
|
|
|
precisonline
President/Chief Technologist
Administrator
Rock Star
    
Posts: 1532
|
 |
« Reply #11 on: August 04, 2009, 07:56:24 AM » |
|
Could you send a text version of the /FD for that one? I suspect it's derived from the key, no?
|
|
|
|
|
Logged
|
-Kevin Accidents "happen"; success, however, is planned and executed.
|
|
|
|
adewitt
|
 |
« Reply #12 on: August 04, 2009, 08:41:46 AM » |
|
The key is: PORT.NBR*SHIPTRN.KEY*LI.NBR. SHIPTRN.KEY is the key to the SHIPTRN record, LI.NBR is the SODET line number and Port Number is the user's port number. SHIPTRN.LF1ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Field Name S.SHIPTRNKEY ³ ³ Field Description Shiptrn Key_________ ³ ³ Field Pos.Subpos 0 ³ ³ Type (A/N/D/M) A ³ ³ Length Of Field 10 ³ ³ Report Heading Shiptrn Key ³ ³ Conversion ³ ³ Derived Field (<0>"G1*2") ³ ³ Allow Amend (Y/N) Y ³ ³ Default Value ³ ³ Validation Code ³ ³ Intuitive Help ³ ³ Help Reminder(Y/N) Y ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
|
|
|
|
|
Logged
|
|
|
|
precisonline
President/Chief Technologist
Administrator
Rock Star
    
Posts: 1532
|
 |
« Reply #13 on: August 04, 2009, 09:20:20 AM » |
|
Al, I think we're at a point of jumping right to "drastic measures" to try to figure this out. Not that we're exactly at that point there, but it might help us get some answers.
First question: Is your code doing anything with @SBPARM(17)?
I'd like you to place a derived value field on row 15 called R.PROC. Make it alpha for a length of 1 with the following derived value expression:
P('EE')
Run the report and when it displays the EE "Expression" prompt, look at the S.SHIPTRNKEY value, @KEY, and also look at @SBPARM(17). Post those values back here and let's see if that tells us anything.
|
|
|
|
|
Logged
|
-Kevin Accidents "happen"; success, however, is planned and executed.
|
|
|
|
adewitt
|
 |
« Reply #14 on: August 04, 2009, 11:20:25 AM » |
|
S.SHIPTRN.KEY = 682735*1
@KEY = 4*682735*1*004
@SBPARM(17) = 4*682735*1*003
|
|
|
|
|
Logged
|
|
|
|
|