Customer Labels
Matte
Member Posts: 2
I have to make a report that prints Customer Labels like Report 110 "Customer-Labels" but I want the user to have the possibility to choose which customers and how many labels of the specific customer will be printed. My Intention was to create a temporary table and then let the user edit this temp. table on the request Form of the report with a table box. So the user can choose the customer No. and the number of labels to be printed.
Cust.No | Quantity
1000 | 15
2000 | 25
3000 | 3
.
.
.
The problem is that I can't set the source table of the request form to the temporary Table and then the table box isn't editable.
Is it possible to make a report in this way or is it better to do in a different way?
The easiest way would be to create a new table but I can't to that due to license.
I' ve tried a lot of things but none of them worked.
Thanks
Cust.No | Quantity
1000 | 15
2000 | 25
3000 | 3
.
.
.
The problem is that I can't set the source table of the request form to the temporary Table and then the table box isn't editable.
Is it possible to make a report in this way or is it better to do in a different way?
The easiest way would be to create a new table but I can't to that due to license.
I' ve tried a lot of things but none of them worked.
Thanks
0
Comments
-
You can use the customer table itself.
-Add an extra field on the table. This field will contain the no. of labels in your temptable. (you can also use it as a default).
-Make a new form with the customer code, name, other info in it and the new field. Insert and Delete are not allowed; Modify is only allowed on the new field.
-make a report with 2 dataitems:
-first dataitem is to SELECT some customers.
-These you save in a temptable in the "OnAfterGetRecord()"-trigger.tmpCustomer := Customer; tmpCustomer.INSERT(FALSE);
-"OnPostDataItem()" :FORM.RUNMODAL(FORM::"your new form",tmpCustomer);
Your form will run and behave as a normal form on a real table. BUT it will work on the temptable! Be sure not to do DB-writes, because this creates a transaction and RUNMODAL will give an error (INSERT in a temptable does NOT create a transaction)
-second dataitem is to process the customers in the temptable. So let the table run on virtual table "Integer".
OnPreDataItem():tmpCustomer.RESET; tmpCustomer.SETFILTER("New Field",'<>0'); RESET; SETRANGE(Number,1,tmpCustomer.COUNT);OnAfterGetRecord():IF Number = 1 THEN tmpCustomer.FIND('-') ELSE tmpCustomer.NEXT;-third dataitem
Probably you need another dataitem for printing the requested number of labels.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!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
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 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