Skip Label

Sevententh
Member Posts: 10
Hi all,
I am trying to create a standard Label Report with 3 columns, based on table Purch. Rcpt Line. The label sheet contains: 3 columns x 6 rows
This has been created successfully (aligned and printing as it should)
Problem: If a sheet has previously had the first 5 labels used, how can I get the report to skip printing on the 1st column + 1st row and start at label 6..?
I have created a C/AL Global variable StartAtLabel where a user can enter the number to start printing the labels from, but my code only skips the first label!
I am trying to create a standard Label Report with 3 columns, based on table Purch. Rcpt Line. The label sheet contains: 3 columns x 6 rows
This has been created successfully (aligned and printing as it should)
Problem: If a sheet has previously had the first 5 labels used, how can I get the report to skip printing on the 1st column + 1st row and start at label 6..?
I have created a C/AL Global variable StartAtLabel where a user can enter the number to start printing the labels from, but my code only skips the first label!
0
Comments
-
This is what I read
You've created a custom report with custom code and custom functionality, based on Purch. Rcpt Line.
You have unwanted behaviour due to one of your functions functioning incorrectly, and you want us to help you.
Based on this information alone, only a supernatural person might help you. (one that can read minds)
Here is what I miss: The actual code.
If that's not available, at leas the dataitems, with identifying what dataitem fills the labels and what dataitem prints the labels.
If it's fully custom we have nothing to go on (save the purch. rcpt. line.0 -
OK then - as stated in first post - I've created a NEW Label Report, with 1 dataitem - Purch. Rcpt Line
The report, self generates a little bit of code on Purch. Rcpt Line - OnAfterGetRecordRecordNo := RecordNo + 1; ColumnNo := ColumnNo + 1; Addr[ColumnNo][1] := FORMAT("Document No."); Addr[ColumnNo][2] := FORMAT("No."); Addr[ColumnNo][3] := FORMAT(Description); Addr[ColumnNo][4] := FORMAT(Quantity); Addr[ColumnNo][5] := FORMAT("Order No."); COMPRESSARRAY(Addr[ColumnNo]); IF RecordNo = NoOfRecords THEN BEGIN FOR i := ColumnNo + 1 TO NoOfColumns DO CLEAR(Addr[i]); ColumnNo := 0; END ELSE BEGIN IF ColumnNo = NoOfColumns THEN ColumnNo := 0; END;
I have NO custom code, I really didn't think it was a difficult question!
Q: How do you SKIP printing on the Nth label..???0 -
First,the definition of custom: any object that can't be found in a standard NAV and any object that is modified.
Second, you can't skip with just 1 dataitem. Because it's fetch record, no print, fetch next , not print, fetch next, print 3, ...
You want to skip to say 5, then you have to have print empty labels (Row 1 = 1 to 3), next you want to skip the first label of row 2 and then start fetching records...
So before the purchline dataitem: you'll have to add an integer dataitem, with 1 empty section as high as the labels section.
onpredataitem integersetrange(number,1, round(startatlabel/noofcolumns,1,'<') //= 5/3 = 1,x rounded down to 1
onaftergetrecord of purch rcpt line. (before the Addr[columno][1])if columno < startatlabel mod noofcolumns then //(5 mod 3 = 2, meaning start at 2) columno +=1;
This posting is as is, code has not been checked nor tested nor cared for0 -
Thanks for your help, it really helped. I had to modify the onaftergetrecord of purch rcpt line, as this calc does not work if
StartAtLabel = 6
NoOfColumns = 3
(StartAtLabel MOD NoOfColumns) = 0 so it would always start at column 1 not column 3 (the 6th label)CASE (StartAtLabel MOD NoOfColumns) OF 1: ColumnNo := 1; 2: ColumnNo := 2; 0: ColumnNo := 3; END;
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions