Report- Printing report and attached Documents at same time

carlacundcarlacund Member Posts: 5
Hi

Could someone please help me? :D

I am trying to get a Purchase Order report to print the report and any documents that are attached to the header of the order at the same time. These documents could be any application.

I just really dont know where to start ](*,) hope someone can help!

thanks in advance

ps: using version 4

Carla

Comments

  • krikikriki Member, Moderator Posts: 9,110
    "Any documents that are attached to the header".
    What kind of documents? Other orders? Documents in other tables?
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • DadouDadou Member Posts: 1
    Hi,

    I've got the same problem. I need to print a picture(located on the drive) attached to my release prod. order header with the link button.

    If someone has an idea on how start that :D
  • carlacundcarlacund Member Posts: 5
    Apologies if i wasnt clear - any documents I mean that are located on the computer/ network - ie. c:\word.doc / excel \ pdf's etc. These documents are saved in the header in a Documents Link.

    hope you can help :)
  • colingbradleycolingbradley Member Posts: 162
    I needed to print the Terms & Conditions for sales and purchase. This is how I did it.

    Table - "Terms & Conditions"
    Enabled Field No. Field Name Data Type Length
    Yes 1 Code Code 10
    Yes 2 File Name Text 100
    Yes 3 Location Text 100

    Added fields in the G/L Setup for each type (we use 3)
    Code File Name Location
    P1 CP ancillary order.pdf \\Server1\Company\Finance\NAV400\Documents
    P2 CP controlled order.pdf \\Server1\Company\Finance\NAV400\Documents
    S1 Sales Terms & Conditions.pdf c:\temp

    From the Sales Invoice
    ///!PrintTerms() #called depending on preview etc
    GLSetup.GET();
    RepType := GLSetup."Sales Terms & Cond. Code";
    Terms.SETCURRENTKEY(Code);
    Terms.SETRANGE(Code,RepType);
    TermsReport.SETTABLEVIEW(Terms);
    TermsReport.RUNMODAL;

    The terms report then runs:

    filename := Location + '\' + "File Name";
    UserSetup.GET(USERID);
    SHELL(UserSetup."Adobe Acrobat Path",STRSUBSTNO('/t "%1"',filename));

    Note the Acrobat path is set up in the User Setup table as the site has a mixture of versions. This is not perfect but works fine for this situation.
    Experience is what you get when you hoped to get money
Sign In or Register to comment.