It sounds like you are looking for a way to create a PDF file that contains the payment details and notes for a specific set of payments based on certain filters (e.g. supplier ID and date range). In SAS, you can use the PROC REPORT procedure to create a report containing the payment details and notes, and then use the ODS PDF statement to save the report as a PDF file.
Here is an example of how you might do this in SAS:
PROC REPORT DATA=mydata;
WHERE supplier_id IN (123, 456, 789) AND payment_date BETWEEN '01JAN2022' AND '31DEC2022';
COLUMNS payment_id, payment_date, payment_amount, notes;
DEFINE payment_id / GROUP;
DEFINE payment_date / ORDER;
DEFINE payment_amount / SUM;
DEFINE notes / DISPLAY;
BREAK AFTER payment_id / SKIP;
COMPUTE after payment_id;
LINE 'Notes:';
ENDCOMP;
COMPUTE after notes;
LINE @2 '--------------------------------';
ENDCOMP;
RUN;
ODS PDF FILE='payment_notes.pdf';
PROC REPORT DATA=mydata;
WHERE supplier_id IN (123, 456, 789) AND payment_date BETWEEN '01JAN2022' AND '31DEC2022';
COLUMNS payment_id, payment_date, payment_amount, notes;
DEFINE payment_id / GROUP;
DEFINE payment_date / ORDER;
DEFINE payment_amount / SUM;
DEFINE notes / DISPLAY;
BREAK AFTER payment_id / SKIP;
COMPUTE after payment_id;
LINE 'Notes:';
ENDCOMP;
COMPUTE after notes;
LINE @2 '--------------------------------';
ENDCOMP;
RUN;
ODS PDF CLOSE;
In this example, the PROC REPORT statement creates a report that includes the payment details and notes for payments made by the specified suppliers within the specified date range. The ODS PDF statement is used to save the report as a PDF file named payment_notes.pdf .
If you want to pass parameters from SAS VA to SAS Portal, you can do so using the SASVA function in SAS Portal. This function allows you to access the current value of a SAS VA parameter from within a SAS Portal report. For example, if you have a SAS VA parameter named p_supplier_id that contains the ID of the selected supplier, you can use the following code in SAS Portal to access the value of that parameter:
data _null_;
supplier_id = SASVA('p_supplier_id');
run;
You can then use the supplier_id variable in your PROC REPORT code to filter the payment data based on the selected supplier ID.
I hope this helps! If you have any other questions, please let me know.
... View more