Add Image Link in AP150 Output

Sort:
You are not authorized to post a reply.
Author
Messages
Giulia
Basic Member
Posts: 12
Basic Member
    We use Image Express by MHC to scan and store all of our AP Invoices. We would like to add a link/hyperlink to the AP150 output report so that a user can see the scanned image when they click on an invoice number in the report. I have been trying to figure out a way to do this via Smart Reports Designer but have been unsuccessful. Has anybody else been able to do this either through Smart Reports Designer, or through any other approach. Or has anybody been successful in re-creating the AP150 output in a Crystal Report?

    Some background, we run a job hourly that creates the image links and stores them in a custom table in Lawson. The table also has company, vendor and invoice as columns. So the image data is ready to be joined to the AP150 report data, but I can't seem to figure out how to do this.
    Ari
    Veteran Member
    Posts: 49
    Veteran Member
      If you have LBI\Reporting Services this would be fairly straight forward.

      First you need to set you AP150 program config file to generate an XML output. Next create your Crystal Report using the OLE DB Query Builder for Database access. Connect the Query Builder to Reports and find the AP150 report with the XML output. After you have established the connection pick the fields and format you want on the report. Next create a second Database connection either with OLE DB or ODBC(If you use OLE DB you will have had to have added the Custom Table in the Lawson Metadata). Select the Custom Table you store the URL Link in and add it to you Database connections. Now Link the first connection to the second by some unique identifying field(s). You can now add the URL field to your report output. Be sure to set URL field as a Hyperlink in Crystal. Now add the report in Reporting Services. If you set an override ID and Password you will need to do it for both the OLE DB and ODBC links.
      Giulia
      Basic Member
      Posts: 12
      Basic Member
        This is great! Thank you so much. I will try it out. I have one question though. How will the report be refreshed with the latest AP150 XML data?
        Ari
        Veteran Member
        Posts: 49
        Veteran Member
          OK. The assumption here is that the AP150 report generating job is scheduled or that someone runs the job before the Crystal report is run. The report needs to be refreshed because the Crystal report is looking at the XML data that is essentially report data for the last time it ran. Also, remember that the Crystal Data Connection is going to a specific print directory to get the AP150 XML file. That means that each time the AP150 job is run it needs to go to the same print directory. (In other words the same user must run the same job.) Also, when you are saving the Crystal report in the Designer, remember to click off the option to save data with report.
          Giulia
          Basic Member
          Posts: 12
          Basic Member
            Sorry, one more issue to mention. We are an iSeries shop. So a users print directory is not static. The path is static to a certain point but then the actual print files are saved in dynamically created and named folders. So for example, if our AP Manager runs AP150 twice in one day the files are not over written but rather saved in two separate folders. The folder directories for the two jobs would like: \\cai501\LAW9\law\print\ACCGS\kg150\1\331161\AP150.xml and \\cai501\LAW9\law\print\ACCGS\kg150\1\331912\AP150.xml. Do you know if the OLE DB connection will know which is the latest file and pick it up?
            Ari
            Veteran Member
            Posts: 49
            Veteran Member
              OK. I didn't realize you were an AS400 shop. In Windows the User Print directories do not change if the Job is the same name. The print and XML files just get overridden. The 331161 and 331912 directories do not exist. This would be a problem because I don't think the OLE DB connection can be dynamically redirected to a different directory for the AP150 XML file. I think the only way around this would be to change the AP150 job(kg150) to a multi-step job where the second step is a script that copies the latest PA150 XML file to a static directory where the OLE DB connection is pointed to.
              Giulia
              Basic Member
              Posts: 12
              Basic Member
                Ok, that makes sense. Thank you so much for all your help!!!!! WAY way more helpful then Infor Support!!!
                You are not authorized to post a reply.