Topic Options
#40108 - 07/18/12 03:25 PM CSV input file
dwal Offline
OL Newbie

Registered: 11/10/11
Posts: 6
I have a CSV Data file. When bringing in the data, I choose CSV as the data emulation. This looks like it brings in the data correctly. However, I need to pull data from multiple data pages to create 1 printed page. I may need to look at at least 2 pages up to 20 pages of data. How can I address this issue of needing to look at multiple data pages. Each data pages as in column 1 either a H (for heading) or a D (for detail). When it starts with a H I need to print a new page. Any suggestions would be greatly appreciated.
Thanks,
Diane

Top
#40138 - 07/19/12 05:00 PM Re: CSV input file [Re: dwal]
JFLAIR Offline
OL Toddler

Registered: 05/18/12
Posts: 42
Loc: Objectif Lune Montréal
Diane,

Looking at the situation you describe, instead of choosing csv as emulation choose User defined.
But first you will have to create your Global Variable by right-clicking on Global Variable. I named it FirstPage. In variable type select Boolean, default value select True.
When selecting User defined click on Use Press Talk Editor, then you will need to make a PlanetPress Talk code that will look like this.
Code:
if(mid(&str,1,pos(',',&str)-1)<>' ')
  if(mid(&str,1,pos(',',&str)-1)='H')
    if(&FirstPage)
      &FirstPage:=False
    else()
      doform()
      clearpage()
    endif()
  endif()
endif()

set(&current.line, &current.line+1)
store(&current.line, &str)


if(ge(&current.line,&current.lpp))
  doform()
  clearpage()
endif()

You may also want to use a Global Function, as the one I linked, to extract the data.

http://www.objectiflune.com/forum2/ubbthreads.php?ubb=showflat&Number=36021#Post36021

If you do use it, you will have to create it by right-clicking on Global Function then copy/paste the function.

Another option would be to process your data with Workflow using an In Stream Data Splitter (splitting before H) , send to folder with concatenate files using the /014 and then use this new file as your data in PlanetPress Design with an Line printer emulation. You will still need a PlanetPress Talk object to extract the data correctly.

If you need any assistance, you can open a customer support ticket, we will be happy to help you.

JF

Top