Announcements
No record found.
After adding the parameter on the OnAction using the following Code
Report Invoice - OnAction()RunReport(REPORT::"Report Invoice","No.");
How to filter the Report based upon the "No." feild ?
*This post is locked for comments
Hi,
You can declare a global variable say 'RecordName' with type as Record and select the subtype as the Record ID eg if your table is customer it will be customer table record.
In your on action write the following code:
Report Invoice - OnAction()
RecordName := Rec;
RecordName.SETRANGE("No.",RecordName."No.");
REPORT.RUNMODAL(50010,TRUE,TRUE,RecordName);
Here 50010 will be your report ID which should run on clicking the action.
Filter upon No. field ?
Can you please explain in more detail.
Hello,
you have a value in your field i.e. "No."so you can filter your record somthing like: TableVariable.GET("No."); REPORT.RUNMODAL(REPORT::"Report Invoice",FALSE,FALSE,TableVariable); Note: Here, first parameter is Report ID, 2nd Parameter is RequestPage 3rd Parameter is System Printer, and 4th parameter is which record you want to print in your report.
Note 2: you are using this action in page and if your page source table is same as Report DataItem then you can directly write this code in your OnAction REPORT.RUNMODAL(REPORT::"Report Invoice",FALSE,FALSE,Rec);
You must pass a filtered record this way:
Record."No." = "No."
Record.SETRECFILTER;
Report.RUNMODAL(REPORT::"Report Invoice",True,FALSE,Record);
Edited: already answered above, please forgive me, and ignore this post.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.