SAVE AS PDF Report From Customer Card (RTC)

rathin_mcarathin_mca Member Posts: 14
I have created an action button (Save as PDF) in customer card page.

when i click the save as pdf button the "Statement " report should save automatically as PDF Specified path.

But the problem is "STATEMENT" report has date filter field so when i try to save as PDF from customer card page am getting the err

"Please specify a filter for the Date Filter field " - this because of flow filter ](*,)

how resolve this err.......? any one faced this earlier kindly let me know.... the below code is written onaction button (Save as PDF)


Customer1.RESET;
Customer1.SETRANGE("No.","No.");
IF Customer1.FINDFIRST THEN
REPORT.SAVEASPDF(116,'D:\Report\',Customer1);

Comments

  • geordiegeordie Member Posts: 655
    Hi, just add the requested filter before FINDFIRST:
    Customer1.SETRANGE("Date Filter",StartEnd,EndDate);
    

    You have anyway to define a criteria for automatically evaluate starting and ending dates (1st January and WORKDATE?) if you need no user interaction at all.
    Note also a complete path + filename is required by SAVEASPDF function, you just provided directory.
  • william_marcelinuswilliam_marcelinus Member Posts: 34
    Dear,

    If solution above giving error on filtering Flow Field, try
    to add Calcfields before Setrange on Date Filter

    eg : Customer.Calcfields(Customer."Date Filter");
  • rathin_mcarathin_mca Member Posts: 14
    Thx : its working fine.
  • geordiegeordie Member Posts: 655
    Good! Please remember to mark the thread as solved.
Sign In or Register to comment.