IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#30248 - 08/04/09 03:42 PM multiple data sources
franklin Offline
OL Toddler

Registered: 04/29/08
Posts: 50
Is there a way to use multiple data sources in the same document simultaniously. Say, use two tables from a database, use a pdf as one and a dbf/csv as another or use a planetpress document to use one data stream and then use that document in another document to aquire another data file.....any ideas....?

thanks

Top
#30249 - 08/04/09 04:01 PM Re: multiple data sources
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
franklin,

You can only have one active data file at a time. In Design, it is possible to add more than one sample data, so you can test the form with multiple data files, but only one can be active at a time, and only one type of emulation can be used at a time.

Regards,
Rapha

Top
#30250 - 08/04/09 04:10 PM Re: multiple data sources
franklin Offline
OL Toddler

Registered: 04/29/08
Posts: 50
thanks - can a form call a form and do virtually the same thing using 2 documents?

Do you know if PSMail can do 2 data streams?

Top
#30251 - 08/04/09 05:02 PM Re: multiple data sources
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
franklin,

You cannot call another form from a form.

PrintShop Mail doesn't allow you to do that either.

Have you tried using some SQL statement to make a view that includes the two tables that you need? If you can join both within the same data sample, this will allow you to get all the information you need.

Regards,
Rapha

Top
#30252 - 08/04/09 05:09 PM Re: multiple data sources
franklin Offline
OL Toddler

Registered: 04/29/08
Posts: 50
I was more after being able to do a north south split of data on a 2up using a data file that is not sorted for nup but in sequencial order. Is there a way to maybe pull in say 5000 records to a data page but have the data be displayed on a 2 up so in basic concept - left side of page 1, record 1, right side of page record 5000+leftside record number. then have it advance 1 record. Yes, I am a crazy man...I am trying to avoid Watch on this one.

Top
#30253 - 08/04/09 05:42 PM Re: multiple data sources
Anonymous
Unregistered


Hello Franklin,

Database emulation requires Watch (unless you plan to print from the design tool). Also, re-organizing data would require watch as well.

However, if you wanted to print from the design tool (to a licensed printer), using some pretty advanced SQL you could most likely accomplish this using a printer resident document. However, SQL to do this would go far beyond the scope of this forum.

Top
#30254 - 08/11/09 10:47 AM Re: multiple data sources
Adrian Offline
OL Expert

Registered: 06/02/03
Posts: 217
Loc: UK
Hi Franklin,

A good way to do this would be to use a Watch process to combine the the data from various sources into a single data file and use that data file in your Document. To do this you can use various VBScripts and splitters in Watch. The trick is to convert each data stream into a common format and concatenate them together - Simple Line Printer data works best. This will only work if there is a piece of data in each file which is common to all files (Such as a customer ID or reference number).

Assuming that each data file is the same format (XML,CSV,LP etc - if not you need to convert them first). On a right-hand branch, you split the files on a change of the common field and write to a folder using the common field as the file name. Then on a second right-hand branch (off the main trunk) you use a secondary folder input to do the same with the next input file, again splitting on change of the common field but the trick is to write the output to the same folder as the previous file, again naming by the common field name and crucially ticking the "Concatenate Files" box in the folder output. In this way you will create files that combine the data from each input stream (again they need to be the same file format for this to work). You can continue splitting and concatenating files in this way for as many data sources as required. The technique of doing each split/combine on a separate right-hand branch uses the fact that a right-hand branch will execute completely before continuing. this means you control the sequence of each split/combine to ensure each input file is completely processes before going to the next one. Finally, on a further right-hand branch, you read the concatenated files from the common folder, use the add/remove plug-in to add a form feed to the end of each file and concatenate them into a final outout folder. This folder will contain a file containing all the data for from each input file for a particular account on datapages separated by form feeds. In your Document design you set the data selector to cut on form feed, set the LPP to a high enough number and you then have all the data from each input file for a particular customer available on a single data page. Sorry that this packs a lot of info into a short space but I hope it will give you some ideas. You just need to break the process down into small steps and test and debug as you go along. Good luck!

Top
#30255 - 10/26/09 03:22 PM Re: multiple data sources
PRT_Glenn Offline
OL Toddler

Registered: 06/25/07
Posts: 43
Loc: Tumwater WA
I need multiple data sources, the problem I am running into when combining my tables into 1, is duplicates print.

Example 3 Tables, Address, Body, and Debit. All are conencted by a unique number.

Adress Table has 1 record per unique number
Body Table has 3 records per unique number
Debit Table has 2 records per unique number

So I get 6 records printing total duplicating information.

Part-A of my form I can only use the 3 records from the Body

Part-B of the form I can only have the 2 from the Debit Table

Part-C of the form I can only have the 1 from the Address Table.

Now the Part-C works becausee I am selecting 1 to 1, but the others can have up to 16, so is there a way to handle this where the duplicate records are not printed?

Top