Passing Filters to Requst Form on a report
n.topalov
Member Posts: 26
Hi,i searched the forum for relating topic but i didn't find a solution to my problem so :
I need to run a report from the Sales Order Form ,using a report variable.My question is how can i pass the filters (which are accordin to the selected Sale Order(doc no. and if any other) to the report and to atomaticaly visualize them to the requst form of the report.Remember i need to run the report from report variable.
Thank you in advance .
I need to run a report from the Sales Order Form ,using a report variable.My question is how can i pass the filters (which are accordin to the selected Sale Order(doc no. and if any other) to the report and to atomaticaly visualize them to the requst form of the report.Remember i need to run the report from report variable.
Thank you in advance .
0
Answers
-
so basicaly you're asking.
When you are on a sales order and want to run a report from the sales order form. You want the sales number you are currently on to have that value filled in the report when you access it.
correct?
Basicially it goes like this
http://www.mibuso.com/forum/viewtopic.php?t=276760 -
yes thats right. The report has Sales Header table as a data item and i want when i run the report from the form to filter the data item for the document No. i was on the Form.0
-
Basicially it goes like this
http://www.mibuso.com/forum/viewtopic.php?t=27676
no that not solve my problem i need when i run the report the filters (the current record) to be placed in the request form as a filters to the coresponding request fields (automatically) ..[/quote]0 -
#-o #-o
RecVariable.setrange(YourField,Yourfield);
report.runmodal(xxx,true,true,RecVariable);
xxx is your report #
for example you would put this code on the command button or menu item that accesses the report.
understand?0 -
Sava be cool.Name DataType Subtype Length SalesHeader Record Sales Header SalesHeader.reset; SalesHeader.setrange("Document Type",Rec."Document Type"); SalesHeader.setrange("No.",Rec."No."); //other filters //SalesHeader.copyfilters(Rec); <- this copies all filters on Rec to SalesHeader Report.run(205,true,false,SalesHeader);
205 -> the ID of the Report also possible instead of the id
REport::"The Name of the Report"
Hope you understand it.
RegardsDo you make it right, it works too!0 -
Yes thats work perfect but like i said in the begining i need to run the report by using a variable type-report ,not using REPORT.RUN(repID,...).Because i need , before run the report to call a function which is defined in the report.This function will fill a gVariable in the report which i have put in as SourceExp i some controls in the sections of the report.
Hope you've understand me .
0 -
The same way.
clear(MyReport); SalesHeader.reset; SalesHeader.setrange("No.","no."); MyReport.MyFunction(MyParapeter); MyReport.SETTABLEVIEW(SalesHeader); MyReport.USEREQUESTFORM := true; MyReport.RUN;
If you are in C/AL Symbol Menu (F5 in C/AL Editor) you can see al your variables, like MyReport, and the function / Properties of your variables. Sometimes its very usefull tu use the C/AL Symbol menu ;-)
RegardsDo you make it right, it works too!0 -
Thank you very much this helped me a lot.This is a good tip. =D> =D>0
-
you're welcome.
Please write [solved} infront of the subject in your first post.
Thanks.Do you make it right, it works too!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
- 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