Processing Report
sarmig
Member Posts: 89
Hi there.
I was assigned a new task. I have to write a processing-only report. From what I could tell, a processing report is like a batch file, which runs a few tasks on the background.
It shouldn't be too hard. Basically, I have to check values from a field of a table, and if the content of that field is 0, it should copy values from a field from another table, obviously bearing in mind that the selected item of those two tables must be the same one.
Ok, so, if you could give me some pointers about where should I start, it would be great. I wish there was a beginner's forum for these rookie questions, but I guess this is the place where the experts are...
Thanks in advance!
I was assigned a new task. I have to write a processing-only report. From what I could tell, a processing report is like a batch file, which runs a few tasks on the background.
It shouldn't be too hard. Basically, I have to check values from a field of a table, and if the content of that field is 0, it should copy values from a field from another table, obviously bearing in mind that the selected item of those two tables must be the same one.
Ok, so, if you could give me some pointers about where should I start, it would be great. I wish there was a beginner's forum for these rookie questions, but I guess this is the place where the experts are...
Thanks in advance!
0
Comments
-
You should start by reading the reporting documentation. If you are a customer, check CustomerSource. If you are a partner check PartnerSource.0
-
Ok, so this is what I have until now (obviously it doesn't work...yet):
RecItem.RESET; RecRoutingLine.RESET; RecItem.SETRANGE("No.", 'M000000', 'M999999'); IF RecItem.FINDFIRST() THEN BEGIN REPEAT IF RecItem."Tempo Fabrico Machos" > 0 THEN BEGIN RecRoutingLine."Run Time" := RecItem."Tempo Fabrico Machos"; RecRoutingLine.MODIFY; MESSAGE('%1', RecRoutingLine."Run Time"); RecItem.NEXT; END UNTIL RecItem."No." = 'M999999'; END
What I want is to filter only the items that begin with the letter 'M', then if those items have a certain field > 0, I want that value to be copied to another table, but on the same item...
I tried doing it alone, with what I know until now, but I was hoping you could point me in the right direction...
Thanks...0 -
RecItem.RESET; RecRoutingLine.RESET; RecItem.SETRANGE("No.", 'M000000', 'M999999'); IF RecItem.FINDSET THEN REPEAT IF RecItem."Tempo Fabrico Machos" > 0 THEN BEGIN RecRoutingLine."Run Time" := RecItem."Tempo Fabrico Machos"; RecRoutingLine.MODIFY; MESSAGE('%1', RecRoutingLine."Run Time"); END UNTIL RecItem.Next = 0;
Do you have right RecRoutingLine record at that point?0 -
Its showing an error that says something like this (I'm translating from the portuguese, so it might not say the same in English): "It's not possible to make any changes in the database until a transaction is initiated"...0
-
mohana_cse06 wrote:Do you have right RecRoutingLine record at that point?
Did you check this?0 -
I was pointed to the right direction: they told me to eliminate the repeat...until and to write the code in the OnAfterGetRecord trigger(I'm using the Item Data Item, but I'm not sure if I should be using the Routing Line Data Item).
I'm sure I'm almost there. Here's what I've got:RecItem.RESET; RecRoutingLine.RESET; RecItem.SETFILTER("No.", 'M*' ); RecRoutingLine.SETFILTER("Routing No.", 'M*'); IF RecItem.FIND AND RecRoutingLine.FIND THEN IF RecItem."Tempo Fabrico Machos" > 0 THEN BEGIN RecRoutingLine."Run Time" := RecItem."Tempo Fabrico Machos"; RecRoutingLine.MODIFY; END0 -
If you are using Item Dataitem then no need to take recItem variable..
Set M* in DataItemTableView-Talbe Filter
In Onaftergetrecord trigger write thisRecRoutingLine.RESET;
RecRoutingLine.SETRANGE("Routing No.","No.");
IF RecRoutingLine.FINDSET THEN
REPEAT
IF "Tempo Fabrico Machos" > 0 THEN BEGIN
RecRoutingLine."Run Time" := "Tempo Fabrico Machos";
RecRoutingLine.MODIFY;
END
UNTIL RecRoutingLine.NEXT = 0;0 -
mohana_cse06 wrote:If you are using Item Dataitem then no need to take recItem variable..
Set M* in DataItemTableView-Talbe Filter
In Onaftergetrecord trigger write thisRecRoutingLine.RESET;
RecRoutingLine.SETRANGE("Routing No.","No.");
IF RecRoutingLine.FINDSET THEN
REPEAT
IF "Tempo Fabrico Machos" > 0 THEN BEGIN
RecRoutingLine."Run Time" := "Tempo Fabrico Machos";
RecRoutingLine.MODIFY;
END
UNTIL RecRoutingLine.NEXT = 0;
Not working...0 -
Check why it is not working?0
-
mohana_cse06 wrote:Check why it is not working?
Yes, I created an item that starts with M....and gave it a "Tempo Fabrico Machos".
In the Routing Line table, and after running the report, its runtime is still 0...0 -
It worked for me without any problem.. :thumbsup:0
-
It worked for me without any problem.. :thumbsup:0
-
First of all, "Tempo Fabrico Machos" - is normal field or flow field?
Do you have solution for your problem or still working on it?0 -
PWL wrote:First of all, "Tempo Fabrico Machos" - is normal field or flow field?
Do you have solution for your problem or still working on it?
Its done here
http://dynamicsuser.net/forums/t/43798.aspx0
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

