Assign Var to textbox
oakey
Member Posts: 6
Hey All,
I have written a custom report that runs through the Sales Inv Headers and LInes, and report on a customer field of requested qty vs qty.
Basically this report shows what a customer wanted, and what we supplied in regards to QTY.
Report Layout:
-Customer
-Sales Invoice Header
-Sales Invoice Line
When the report is run, you supply a date range for the Sales Inv Header for Posting Date.
The Customer Header section of the report has all the heading information, but will not show the Posting Date filter that has been applied when the report was run.
I used a text box and set its source to be
"Sales Inv. Header".GETFILTER("Posting Date")
but it will not get it. The only way i can get the date supplied is if i put the following code into the Sales Inv Header part of the report.
Sales Invoice Header - OnAfterGetRecord()
Number := Number + 1;
IF Number = 1 THEN
BEGIN
Filters := "Sales Invoice Header".GETFILTER("Posting Date");
MESSAGE(Filters);
END;
The message box pops up with the correct date filter supplied, however due to the customer header section of the report already being generated it wont show it on the report.
Is there a way to assign a value to a Text box in code ? or a value to a label in code ???
I have written a custom report that runs through the Sales Inv Headers and LInes, and report on a customer field of requested qty vs qty.
Basically this report shows what a customer wanted, and what we supplied in regards to QTY.
Report Layout:
-Customer
-Sales Invoice Header
-Sales Invoice Line
When the report is run, you supply a date range for the Sales Inv Header for Posting Date.
The Customer Header section of the report has all the heading information, but will not show the Posting Date filter that has been applied when the report was run.
I used a text box and set its source to be
"Sales Inv. Header".GETFILTER("Posting Date")
but it will not get it. The only way i can get the date supplied is if i put the following code into the Sales Inv Header part of the report.
Sales Invoice Header - OnAfterGetRecord()
Number := Number + 1;
IF Number = 1 THEN
BEGIN
Filters := "Sales Invoice Header".GETFILTER("Posting Date");
MESSAGE(Filters);
END;
The message box pops up with the correct date filter supplied, however due to the customer header section of the report already being generated it wont show it on the report.
Is there a way to assign a value to a Text box in code ? or a value to a label in code ???
0
Comments
-
u have written the code in that u have taken 1 Varialbe Filters.Is in it?Put it in the Textbox source expressionVikram Dabas
Navision Technical Consultant0 -
Yes sorry i should have clarified.
Filters is a Text Global Variable.
Number is an Integer Global variable.
I use number just so that is only executed the code once.
I have a textbox with its src exp. as "Filters".
Due to the Customer heading being run first however the data never makes it there.
Is there a way that i can set the value of the text box in code such as
//TXTBOX name = txtbox
txtbox := Filters;
OR
txtbox := "Sales Invoice Header".GETFILTER("Posting Date");
???0 -
I would use
Filters is a Text Global Variable.
I have a textbox with its src exp. as "Filters".
Filters := FORMAT("Sales Invoice Header".GETFILTER("Posting Date"));
Hope this helpsNAV - Norton Anti Virus
ERP Consultant (not just Navision) & Navision challenger0
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
- 322 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