Go Back   MarcomCentral (PTI) and FusionPro User Communities > Support > Issues, Questions, Etc.


Thread Tools Search this Thread Display Modes
Old December 17th, 2021, 07:16 AM
rsheldon rsheldon is offline
Junior Community Member
Join Date: Sep 2008
Location: Upper Marlboro, MD
Posts: 30
Default Printing External Database

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
Reply With Quote
Old December 17th, 2021, 08:06 AM
bkurzbuch bkurzbuch is offline
Regular Contributor
Join Date: May 2014
Posts: 115
Default Re: Printing External Database

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
Reply With Quote
Old December 17th, 2021, 09:57 AM
sschardan sschardan is offline
Regular Contributor
Join Date: Oct 2008
Location: St. Louis, MO
Posts: 102
Default Re: Printing External Database

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.
Reply With Quote
Old December 17th, 2021, 03:59 PM
Dan Korn's Avatar
Dan Korn Dan Korn is offline
FusionPro Senior Engineer / Forum Moderator
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,640
Default Re: Printing External Database

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.
Dan Korn
FusionPro Developer / JavaScript Guru / Forum Moderator
PTI Marketing Technologies | Printable | MarcomCentral

I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com.

Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs.

This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data.

Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages.

Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance.

Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support.

How To Ask Questions The Smart Way

The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript.

Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5.

return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)});

Last edited by Dan Korn; December 17th, 2021 at 04:08 PM..
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -7. The time now is 07:25 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.