Report Question
Steve
Member Posts: 81
I created a table that contains the number of labels need to be printed. The data is as follows
Entry No , Item No, Decsription, Qty. to Print
1 , 0001 , Item1 , 3
2 , 0002 , Item2 , 2
3 , 0003 , Item3 , 6
I have a label report that has 7 labels wide and I need to print the items above into thise report. So the first row of labels would have
Positions
1 2 3 4 5 6 7
0001 0001 0001 0002 0002 0003 0003 <- row 1
0003 0003 0003 0003 <- row 2
Is this possible? I was able to do the prinitng when its a 1 table line per postion, but I haven't figured out how to reprint the same item multiple times.
Hope this makes sense.
Thanks
Entry No , Item No, Decsription, Qty. to Print
1 , 0001 , Item1 , 3
2 , 0002 , Item2 , 2
3 , 0003 , Item3 , 6
I have a label report that has 7 labels wide and I need to print the items above into thise report. So the first row of labels would have
Positions
1 2 3 4 5 6 7
0001 0001 0001 0002 0002 0003 0003 <- row 1
0003 0003 0003 0003 <- row 2
Is this possible? I was able to do the prinitng when its a 1 table line per postion, but I haven't figured out how to reprint the same item multiple times.
Hope this makes sense.
Thanks
Steve
0
Comments
-
Here a simple / easy solution (cost 5 minutes).
The report use as DataItem INTEGER. Before the Dataitem is running, we store the Datas from your Label table to a temporary table (here table 32, you can use your own with 7 Text coloumns of lenght 20).OBJECT Report 50000 LabelTest { OBJECT-PROPERTIES { Date=17.10.08; Time=07:09:32; Modified=Yes; Version List=; } PROPERTIES { } DATAITEMS { { PROPERTIES { DataItemTable=Table2000000026; DataItemTableView=SORTING(Number); OnPreDataItem=BEGIN LabelTest.RESET; LabelTest.SETFILTER("Qty. to print",'>%1',0); LabelTest.SETFILTER("Item No.",'<>%1',''); IF LabelTest.FINDSET(FALSE,FALSE) THEN BEGIN REPEAT TempTab.INIT; TempTab."Entry No." := LabelTest."Entry No."; FOR i := 1 TO LabelTest."Qty. to print" DO BEGIN CASE i OF 1: TempTab."Item No." := LabelTest."Item No."; 2: TempTab."Source No." := LabelTest."Item No."; 3: TempTab."Document No." := LabelTest."Item No."; 4: TempTab.Description := LabelTest."Item No."; 5: TempTab."Global Dimension 1 Code" := LabelTest."Item No."; 6: TempTab."Global Dimension 2 Code" := LabelTest."Item No."; 7: TempTab."External Document No." := LabelTest."Item No."; END; END; TempTab.INSERT; UNTIL LabelTest.NEXT = 0; END; TempTab.RESET; SETRANGE(Number,1,TempTab.COUNT); END; OnAfterGetRecord=BEGIN IF (Number = 1) THEN TempTab.FIND('-') ELSE TempTab.NEXT; END; } SECTIONS { { PROPERTIES { SectionType=Body; SectionWidth=13500; SectionHeight=423; } CONTROLS { { 1119402000;TextBox;0 ;0 ;1800 ;423 ;HorzAlign=Right; SourceExpr=TempTab."Item No." } { 1119402001;TextBox;1950 ;0 ;1800 ;423 ;HorzAlign=Right; SourceExpr=TempTab."Source No." } { 1119402002;TextBox;3900 ;0 ;1800 ;423 ;HorzAlign=Right; SourceExpr=TempTab."Document No." } { 1119402003;TextBox;5850 ;0 ;1800 ;423 ;HorzAlign=Right; SourceExpr=TempTab.Description } { 1119402004;TextBox;7800 ;0 ;1800 ;423 ;HorzAlign=Right; SourceExpr=TempTab."Global Dimension 1 Code" } { 1119402005;TextBox;9750 ;0 ;1800 ;423 ;HorzAlign=Right; SourceExpr=TempTab."Global Dimension 2 Code" } { 1119402006;TextBox;11700;0 ;1800 ;423 ;HorzAlign=Right; SourceExpr=TempTab."External Document No." } } } } } } REQUESTFORM { PROPERTIES { Width=9020; Height=3410; } CONTROLS { } } CODE { VAR LabelTest@1119402001 : Record 50001; TempTab@1119402000 : TEMPORARY Record 32; i@1119402002 : Integer; BEGIN END. } }
So, thats a very simply examle.
An other way is to use a array[7] and a sepereate (then 2) DataItems
-Label Item
---Integer <- here filling the Array[7] (for i := 1 to Qyt. do begin Array := "Label Item"."Item No." end) and filter this DataItem for the Qyt.
RegardsDo you make it right, it works too!0 -
I think array is the way to go too. Garak it would be great if you edited your post to use the (CODE) thing - then they can just hit the copy code button
0 -
Your wish is my command.
Do you make it right, it works too!0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions