rsheldon Posted December 17, 2021 Share Posted December 17, 2021 Good Morning Everyone, I am having issues with an external database composing records when using FusionPro Server. I am using Mac OS 10.15.7, Adobe Acrobat DC 2021, FusionPro VDP Designer 12.0.2. I have and onjob start rule that pulls in the external database (see below) externalDF = new ExternalDataFileEx('196176_IDM_22NB JAN NEWSLETTER FINAL DATA.txt', '\t'); if(externalDF.valid != true) { Print('Failed to link to the external data file in OnJobStart'); } When I preview on screen, everything looks correct, however when I compose a record or several records, the external database does not print. What am I missing? Thank You, Rob Sheldon Quote Link to comment Share on other sites More sharing options...
bkurzbuch Posted December 17, 2021 Share Posted December 17, 2021 Hi Rob I had the same issue when we switched to producer. Try adding the XDF as a plain text resources and then compose. That should fix the problem Quote Link to comment Share on other sites More sharing options...
sschardan Posted December 17, 2021 Share Posted December 17, 2021 When using XDF with producer, we always have to be sure to include a copy of it in the folder designated in the "search path for images" in producer. Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted December 17, 2021 Share Posted December 17, 2021 (edited) The issue is that the XDF is present on your local Designer machine, but is not found when you do the full composition on the remote FP Server machine. As others have noted, this has been an issue for users of FusionPro VDP Producer as well. But that was the past. A lot of things changed in FP 11. We added a feature in FusionPro VDP 11.2 to make this all much easier. Instead of putting the XDF file on the network, or adding it as a plain text resource, you can now manage XDF files, which we now call Secondary Data Sources, in the same way you define your primary data source. From the Define Data Source dialog, you can click on the Secondary Sources button. Or, from the menu in Acrobat, you can select FusionPro -> Data Definition -> Secondary Data Sources. This brings up the new Data Sources dialog, where you can define all of your data sources the same way as your primary source. So, instead of defining your XDF in JavaScript, you can now add the data source, of any format (including ODBC on Windows), using the Data Sources dialog. When you click Add, you'll be taken through the same set of Wizard dialogs as with your primary data source, where you can select all of the options relevant to the data, such as the delimiter, the encoding, and even the sheet for Excel. Also, on the Collect dialog, there's now a check box for Secondary data sources (which is checked by default). So the data source will automatically be collected up with the other job files, including the primary data source, and will always be found, even in a remote composition with FP VDP Producer or Server. Also, the data source will be accessible by its source name in your rules. So instead of this: externalDF = new ExternalDataFileEx('196176_IDM_22NB JAN NEWSLETTER FINAL DATA.txt', '\t'); You can simply access the source by whatever name you gave it on the Data Sources dialog, such as: externalDF = FusionPro.GetDataSource("My Secondary Data"); (TV voice) But wait, there's more! With the new Secondary Data Sources functionality, in most cases, you don't need any JavaScript at all to access the XDF data. You can set up a mapping from your primary data to the secondary data records, and use the secondary data fields directly in the Text Editor, just like your primary data fields. Or, if each record in your primary data maps to multiple records in the secondary data (such as an account number mapping to multiple transactions), you can use the new Form rules for tables in FP 11 to create a table from the matching data, again with no JavaScript at all! If you're willing to post the job, I can show you how you can set it up to access the XDF without any JavaScript rules at all. Or, you can take a look at the Statement-MultiFile.pdf job in the Statement folder under the FusionPro Tutorials (from the Acrobat menu, FusionPro -> Documentation -> Tutorials). This is also all documented in the FusionPro VDP User Guide, in the sections about Secondary Data Sources and Tutorials. Edited December 18, 2021 by Dan Korn Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.