SET_PRINTER and MV Fields (OpenInsight 32-bit Specific)
At 02 MAY 2011 05:35:08PM Marty Rosenbloom wrote:
I am using SET_PRINTER for the first time to create a report. I have the heading and column headers created nicely, but I am having difficulties bringing in the data for each column (there are 6 columns). I am using XLATE to obtain the data for each column. The @VM in each column is converted to @FM and an @VM is added to the end of each column of data. My report prints all the data in one column.
Snippet of code:
Margins are preset and work fine
Stat=Set_Printer("INIT", "WORK_SCHEDULE", "", Margins, 1, 4)
.
.
.
T_Matt =XLate(Table, SchedDate, "MATT_TWIN", "X")
T_Box =XLate(Table, SchedDate, "BOX_TWIN", "X")
.
.
.
Convert @VM To @FM In T_Matt
Convert @VM To @FM In T_Box
.
.
.
Table2=T_Matt:",":T_Box
.
.
Convert "," To @VM In Table2
.
.
Stat=Set_Printer("ADDTABLE", ColWidth2,"", Table2, "", "", "", TB_ALL)
.
.
.
Stat=Set_Printer("TERM")
Everything else that I am doing on this report works fine but I can't find the error of my ways.
Thanks,
Marty
At 03 MAY 2011 09:00AM Sean FitzSimons wrote:
Marty,
The ADDTABLE message wants accepts @vm delimited column data with @fm delimited rows.
For Example:
row1=Col 1 Row 1" : @vm : "Col 2 Row 1" : @vm : "Col 3 Row 1"
row2=Col 1 Row 2" : @vm : "Col 2 Row 2" : @vm : "Col 3 Row 2"
table=row1 : @fm : row2
I sense that what you need to do is something along the lines of:
tableData="
numRows=dcount( t_matt, @vm )
for i=1 to numRows
tableData := t_matt : @vm : t_box : @fmnext i
And then place the tableData into the ADDTABLE message.
Sean
At 04 MAY 2011 12:07PM Marty Rosenbloom wrote:
Sean,
Thanks for the response. I am having fun learning SET_PRINTER. The actual report I am trying to create has 20 columns. Your analysis was correct. I did as you suggested and it worked fine. The challenge that presented itself was that not all of the columns have the same amount of rows. Because of this some of the data starts in the wrong column. Now trying to figure out how to add @VM delimeter to each column that is short.
Marty
At 04 MAY 2011 12:45PM Marty Rosenbloom wrote:
Turns out it was operator error. Works fine.
Thanks,
Marty
At 04 MAY 2011 05:43PM Marty Rosenbloom wrote:
Is there a way to sort the data? My report has 20 columns and the sorting should be on three of those columns.
Thanks,
Marty
At 04 MAY 2011 09:50PM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
You mean apart from V119? As in sort it THEN load it?
World leaders in all things RevSoft