Print to BullZip PDF problem

G8torG8tor Member Posts: 29
Hello

I have report that im going to output to Bullzip PDF printer. I used the ara3n webblog to guide me through this. http://mibuso.com/blogs/ara3n/2008/08/01/save-nav-reports-to-pdf/.

But I notice when I used the same method that he described in the webblog I only can use one dataitem filter to print to the PDF. My report hast two dataitem tab on the request form and both with inserted filter on it. So when I print to PDF file from Bullzip I only get the header of the report that is filtered by Employee."No." and nothing probably because the filter from second dataitem tab LedgerInfo."Posting Date" is not sent to the PDF Codeunit. My report works fine in the "Print preview". How can I print out report in Bullzip PDF that has filters on two dataitems? How will the codeunit look like?

Dataitems
Employee -> Request form filter is "No."
Ledgerinfo -> Request form filter is "Posting date"

Comments

  • ara3nara3n Member Posts: 9,256
    You need to create a variable for your report and pass the two dataitem data filters.


    Like this.
    MyEmployee.setrange("No.",'Blah');
    
    Myreport.SETTABLEVIEW(MyEmployee);
    
    Ledgerinfo.setrange("posting date",TODAY);
    
    Myreport.SETTABLEVIEW(Ledgerinfo);
    
    Myreport.USEREQUESTFORM(false);
    Myreport.RUNMODAL;
    
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • G8torG8tor Member Posts: 29
    Thanks ara3n. This is exactly what I was looking for.
  • ara3nara3n Member Posts: 9,256
    You are welcome.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • G8torG8tor Member Posts: 29
    Can I have follow up question?

    This report that Im doing very complex.

    1. The request form have controls that controls what appears in the report. If I have checkbox that I click on the request form that is connected varible that controls the flow of the report. How can I make this variable affect the report in the CU when I call it?

    2. If I have two dataitems that points to the same table. When I set the Myreport.SETTABLEVIEW(LederInfo) to add the filter for the first dataitem, will the second dataitem with the same record table override the SETTABLEVIEW(Ledgerinfo). Myreport.SETTABLEVIEW(MyEmployee);

    DataItems
    Employee
    ->LedgerInfo
    ->Journal Calculation
    ->LedgerInfo : Dataitem pointed to the same table as the above Lederinfo.
    -> Entry

    How do you print out complex report with multiple filters on dataitems in Bullzip PDF?
  • ara3nara3n Member Posts: 9,256
    1. Create a function in your report to set the value of the checkbox. Then cal the function from your CU before calling CU.

    2. Change the report to copy the filters from first LedgerInfo to the second one on OnPreReport, or follow the steps above and create a function and pass the filters .
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.