Report Print to PDF Problem

Vineeth.RVineeth.R Member Posts: 121
Dear Friends,

Since my previous post didnt get any suitable reply i tried to restructure my program. My user want to print the Statement Report (116) to pdf. As you know there is request form in this report where they can select various options. So i need to pass these request values to my report when i call this report from the PDF creation form.

In the PDF form i created fields where user can select all the options and filters same as the report and when they click print the pdf should be sent to the path. Here i have a problem.

if i use below way of calling the report the pdf is generated correctly. But here i cannot pass my parametres to the report, though i have created a function inside the report to accept the parametres from any object. I can only filter my custmer table[vCustomer] but those options I cannot pass to report as Report.runmodal dont have any property to pass parametres or allow calling the function in the report.

REPORT.RUNMODAL(116,FALSE,true,vCustomer);


So i tried to use Report varaible where i can call the function which i created inside the Statement report to accept the parametres from the PDF form before calling vReport.runmodal.
When i run the below code it did not work and PDF creating is hanged mid way, i think it happen because in the below code[vReport.RUMODAL] we dont have option to set the SystemPrinter option to TRUE or False like the REPORT.RUNMODAL(116,FALSE,TRUE,vCustomer). The rpeort 116(Statement) the property UseSystemPrinter is set to TRUE by default, still didnot work . See attcahed screen shot below.


CLEAR(vRepStatement);
vRepStatement.fGet(PrintEntriesDue,PrintAllHavingEntry,PrintAllHavingBal,LogInteraction,AGEPeriodLength,AgeingDate);
vRepStatement.SETTABLEVIEW(vCustomer);
vRepStatement.USEREQUESTFORM := FALSE;
vRepStatement.RUNMODAL;



Please help me on this.

1) Is there any way to pass parametres to my report(116) if i use REPORT.RUNMODAL from my Form?

2) Can we set SystemPrinter to TRUE if i use Report Variable vReport.---- ?

If i get any one of the above i can generate the PDF.

thanks and regards
Vineeth.R
Thanks and Regards
Vineeth.R

Comments

  • Vineeth.RVineeth.R Member Posts: 121
    The attcahment
    Thanks and Regards
    Vineeth.R
  • BGIBGI Member Posts: 176
    if you use reportvariable.run...imho navision takes the default printer of the user if there is no requestform or no entrie in the printer selection table for this report and/or user.
    To resolve simular pdf printing problems, we add in the code a entry to the printer selection table jst before the run of the report (the printer should have the same name on all computers) and after the print we remove this line from the printerselection.

    but even without this you should have a report coming out somewhere on the defaultprinter. Are you sure the coding of the report is not causing it to loop somewhere in the report?
    Rgds
    Benny Giebens
Sign In or Register to comment.