Item Wise Report Generation
vipinkuruvilla
Member Posts: 143
Hai All,
I want to print an Item wise report. The report is taken from a screen which has both header and a line.
Now whenever I click on the print button it takes me to the report, where I can see the Document No as my header No.
PLease find the code in my Print button :
Now to get the Item No what I should do as my Rec (Sales Header) dont have item no. Please give me your valuable suggestions.
Is it possible to get item wise in this scenario?
Thanx in Advance...
I want to print an Item wise report. The report is taken from a screen which has both header and a line.
Now whenever I click on the print button it takes me to the report, where I can see the Document No as my header No.
PLease find the code in my Print button :
RecSalesLine.RESET; RecSalesLine.SETRANGE(RecSalesLine."Document No.","No."); REPORT.RUNMODAL(REPORT::"PL Sticker Printing",TRUE,TRUE,RecSalesLine);
Now to get the Item No what I should do as my Rec (Sales Header) dont have item no. Please give me your valuable suggestions.
Is it possible to get item wise in this scenario?
Thanx in Advance...
0
Answers
-
It means you want to filter the report on the item, you have selected in the subform?
If yes, you need to call the report from the subform (or best from the sales line table, through function on the subform).
something like this:
on subform create functionfunction CallMyReport begin Rec.CallMyReportOnThisLine; end;
on sales line table create function:function CallMyReportOnThisLine; begin RecSalesLine.RESET; RecSalesLine.SETRANGE("Document Type","Document Type"); //do not forget to filter on the document type!!! RecSalesLine.SETRANGE("Document No.","Document No."); RecSalesLine.SETRANGE(Type,RecSalesLine.Type::Item); RecSalesLine.SETRANGE("No.","No."); REPORT.RUNMODAL(REPORT::"PL Sticker Printing",TRUE,TRUE,RecSalesLine); end;
and on the button on the card add code like this:CurrForm.Subform.FORM.CallMyReport;
where Subform is name of your subform control...0 -
kine wrote:It means you want to filter the report on the item, you have selected in the subform?
If yes, you need to call the report from the subform (or best from the sales line table, through function on the subform).
something like this:
on subform create functionfunction CallMyReport begin Rec.CallMyReportOnThisLine; end;
on sales line table create function:function CallMyReportOnThisLine; begin RecSalesLine.RESET; RecSalesLine.SETRANGE("Document Type","Document Type"); //do not forget to filter on the document type!!! RecSalesLine.SETRANGE("Document No.","Document No."); RecSalesLine.SETRANGE(Type,RecSalesLine.Type::Item); RecSalesLine.SETRANGE("No.","No."); REPORT.RUNMODAL(REPORT::"PL Sticker Printing",TRUE,TRUE,RecSalesLine); end;
and on the button on the card add code like this:CurrForm.Subform.FORM.CallMyReport;
where Subform is name of your subform control...
Thanks a lot Kine......This is working fine
0 -
You are welcome! 8)
Remmember: if I do not have enough info to run something with correct parameters, probably I am running it from wrong place... ;-) (or something like that)...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
- 611 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
