A Diagram of the 'Connections'
logo (image) placed on the Template
The Chart uses the same dataource & is placed on the template
Table (pebs_1)
Table (pebs_2)
joined
The 2 Tables are JOINED.  The desired datafields selected and Casts, Expressions & other functions applied as appropriate.
A datasource is made on the Query.The datasource is like a 'mirror' of the Query and is now a floating layer of data -- accessible by Charts, Templates, Applications, etc.  
An Action is created automatically that links the Query to the Datasource.
The XML for your Template is stored safely in your account.The Template loads the XML when launched.
Click the pdf icon.  The XML is Saved - and pulls the datasource, merging it into the static template XML.  The PDF is then processed on the server.
The Template
PDF
The original purpose of the Younicycle was to allow the development of Personalized (data driven) PDF's for print, specifically Benefit Statements.  We soon realized that this goal would require the development of many Tools:
Developing a Rudimentary Benefit Statement with Younicycle: a Personalized PDF for Print
STEP 1
Your first step should be to visually organize your static content - and avoid intermingling data driven content with static content.  As an example, when laying out a Template and adding text:
XYZ offers several Options for your Health Care, to include choices of BSBS, Really Good HMO and the new, high-deductible Bla Plan.  
OK
XYZ offers several Options for your Health Care, to include choices of BSBS, Really Good HMO and the new, high-deductible Bla Plan.  You are enrolled in the BCBS Plan with Family Coverage.
Bad
Best
XYZ offers several Options for your Health Care, to include choices of BSBS, Really Good HMO and the new, high-deductible Bla Plan. [ health_text]
STEP 2
Begin developing the variable text alternates for [health_text].  You may have 20 or 100 variations, but at this pont - be more concerned with the variation with the most characters (the longest string of text).  Place that in your brackets so that you can see how it affects the textflow.  Mapping your 'visual space can be done -- even without 'real data'.  Example:
XYZ offers several Options for your Health Care, to include choices of BSBS, Really Good HMO and the new, high-deductible Bla Plan.  [You are enrolled in the new, high-deductible Bla Plan with Family coverage.]
It's better to understand issues such as word wrap early, rather than late.  Late could mean a redesign of the Template.  Depending on the Template, a bit of a nuisance.
Systematically identify Static vs variable data.  Keep working until you are OK with placement and static content.
STEP 3
STEP 4
For each Variable item, ask yourself - or your HRIS person:  "What data  items do we need to Query in order to provide this variable content?"
The answer to this question is rarely 'simple' as the data elements required for benefit statements touch much of your HR system.  Since there are 1,000's of possible systems & implementations, the data collection portion of this newsletter will be necessarily brief.  
This lesson is meant to accompany - the Free Benefit Statement - that comes with Younicycle.Sometimes the best way to learn - is by breaking everything apart - and putting it back together.
SUMMARY Part 1 - Load the Template
Use the YTree (on far left after you login).  Select the Template and click 'Load'.  The Template will require about 30 seconds to load.  After it does, you should see (+ -) the cropped image that is below.
Click on objects & 'see what happens'.  Drag objects around, resize, change properties & add - or delete text.  See if you can identify what is - and isn't variable data. (Hint: click the lightning bolt, then click the artboard).
The functionality of the editor is similar to any layout Tool -- and is best learned by experimenting.
template
If you double-click some text -> insert your cursor -> and then select the 'lightning bolt' from the Toolbar, select a field, it will insert (merge) into the text block.
Part 1Design Editor (The Template)
Part 2 Add Tables(Some Data)
Regardless of how you output your documents, you will eventually need to address the data.  Before you walk down that path, set your goals a bit lower.  Let's try to get ANY data to be embedded & 'work'.  That will be measureable success.  The Tables below are NOT set up to be correct - or efficient.  They are set up to help you get started with understanding a basic building block, the Table.
STEP 1
STEP 2
STEP 3
STEP 4
Look at the YTree and you will see 2 Tables: peb_1 and pebs_2.  Each of them are only 1 row of information.  Large Tables could hold millions, even billions of rows.Click on pebs_1 and you will see information about its structure and its values.  Review the image below.
stucture
use these buttons to Edit the Structure of the Data
Edit is active in the image below
change data types with the drop down listsshown left
Click View to view the Values (data) in the Table
Q: Is there any rhyme or reason to the Structure shown above?A: A little bit, but not much.  The Goal is to help you to understand how 2 Tables can be JOINED, with the results getting 'into' the PDF.  Baby steps. Click View  (Values) and you will see what is below.  Also - take a moment to review the Diagram of Connections shown above and see where Tables fit into the Connections.
hmmm. ee_id could be useful
structure 2
We only have 1 Row (employee).... Inessa Kovtun.  Our goal is to get her data INTO the pdf.
Once again using the YTree - navigate to Tables - > peb_2.  You will see a different Table, with a different Structure and different data.  Both peb_1 and pebs_2 have only 1 row.
As you look at pes_2, see if you can identify the Common element .... the element that both share.  See below.
structure 3 structure 4
Once again, we have one employee -Inessa Kovtun - with additional data.  The challenge?  Get them 'together'.
Compare the 2 Table structures side by side. there may be similarities -but it's hard to know for sure.....
ee_idh_tdbl_tltd_tlife_tvac_daysholidayspers_days
namedohee_ida_wageh_rateptoptwotbtcptw_pctaw_pcth_ddsblissrtrptostbpay_periodshrs_per_pay
Note that descriptions were left empty on both Tables.  That is NOT the way to set up a Table.  You may forget the meaning - or another person may be left scratching their head.  Below would be more helpful:
namedohee_ida_wageh_rateptoptwotbtcptw_pctaw_pcth_ddsblissrtrptostbpay_periodshrs_per_pay
full namehire dateemployee idannual wagehourly ratepaid time offpay for time workedother benefitstotal compensationpay for time worked percentannual wage percenthealth dental contributiondisability benefits contributionlife insurance contributionsocial security contributionretirement contributionpaid time of & special programstotal benefitspay_periods per yearhours per pay period
ee_idh_tdbl_tltd_tlife_tvac_daysholidayspers_days
employee idhealth textdisability textltd textlife textvacation daysholidaysperssonal days
We see that ee_id is common to both Tables.  You must also make sure that they are of the same TYPE and in this case - they are both INTEGER.  It will be important that both have the same TYPE.  In fact, it make no difference at all if one is called ee_id and the other is called identification_code (or whatever).  It isn't the name that is important -- it's the type.  An integer can JOIN an INTEGER, a STRING a STRING, etc.
So if we JOIN -- where ee_id = ee_id .... well, we'll know something.  What we'll know remains to be seen.
Getting Started with 'combining Tables'  SQL Editor
I am always doing that which I cannot do, in order that I may learn how to do it.    
 Pablo Picasso
This walk through includes a brief introduction the above.  Our initial Goal -- get any Data into a Template for the creation of a personalized PDF.
on this page