Can we pass parameter into the report?

RachelSoon
Member Posts: 202
Can we pass a parameter from a processing only report to a normal report?
My scenario :
I have 2 report, let say the processing only report as Report 1 and normal report as Report 2.
Report 1, which require ReqFilterField to be entered by the user. After the running the report 1, Report 2 need to be printed. The Report 2 needs the same ReqFilterField which were previously used for the Report 1.
I am wondering if i can pass those ReqFilterField in the Report 1 to the Report 2 rather than let the user key in the exactly same ReqFilterField for the Report 2.
The ReqFilterField could be the field in the dataitem or the variable in the option tab(the field in the request form).
My scenario :
I have 2 report, let say the processing only report as Report 1 and normal report as Report 2.
Report 1, which require ReqFilterField to be entered by the user. After the running the report 1, Report 2 need to be printed. The Report 2 needs the same ReqFilterField which were previously used for the Report 1.
I am wondering if i can pass those ReqFilterField in the Report 1 to the Report 2 rather than let the user key in the exactly same ReqFilterField for the Report 2.
The ReqFilterField could be the field in the dataitem or the variable in the option tab(the field in the request form).
0
Comments
-
I solve this the following way :
In report 2, I create the parameters as global variables. Then I make a function to set these parameters.
In report 1, where you want the second report to be run, declare a variable for report 2 . First call the function to set the parameters(e.i report2.setparameters(x,y,z), after that run the report. Of course, you will have some kind of setrange or setfileter with the variables in report 2.0 -
i did something similar but for calling a dataport, i had a command button in the form that called the dataport that had the following code:
CLEAR(ImportQuoteLines); ImportQuoteLines.SetWorksheetNo("No."); ImportQuoteLines.RUNMODAL; CurrForm.UPDATE;
Where ImportQuoteLines is my dataport.
and then I had a SETRANGE in the dataport onpredataitemPurchaseLine.RESET; CLEAR(Line); PurchaseLine.SETRANGE("Document No.",DocNo); IF PurchaseLine.FIND('+') THEN Line := PurchaseLine."Line No." ELSE Line := 0;
where DocNo comes from the function SetWorksheetNo(No : Code[10]) in my dataport (called from the form) and has just one line of codeDocNo := No;
0 -
You can also embed report 2 in report 1, just copy the dataitems from report 2 into report one, you can set a boolean if you do not need to run the second part, this way you will also be able to use the getfilter(s) within your report to pass the filters from one dataitem to the other, also saves an extra object(in this case report) number in your liscence numberingSaro0
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
- 320 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