jmac13
Member
Hi All,
I'm using open edge 10.2b.
We currently send information to excel to printout in a the form of a CSV and excel then imports. We build up this csv by doing the following:
This uses the query in the browse and goes round the table and we then add whats columns are in the browse (xheaders) to the string.
My question is that at the moment this is having to be done in every program is there a way to do this in a persistent procedure. Does the browse hold the data i need? Can i just pass the browse handle and make a string from that? the browse object gets a lot of what i want.. the column headings the columns i want but im not sure how to get hold of the data?
any ideas would be great cheers
ssss weq
I'm using open edge 10.2b.
We currently send information to excel to printout in a the form of a CSV and excel then imports. We build up this csv by doing the following:
Code:
whHeaderBuffer = buffer {&browse-table}:handle.
get first {&browse-name}.
repeat:
process events.
if not available {&browse-table} then
leave.
assign chrLine = ""
intRow = intRow + 1.
do intI = 1 to num-entries(xHeaders):
assign chrVariable = ""
hName = entry(intI,xHeaders).
case hName:
otherwise
do:
whFieldInfo = whHeaderBuffer:BUFFER-FIELD (hName).
run ExcelFormat(whFieldInfo,intStartRow,intRow,intI).
if whFieldInfo:data-type = "character" then
chrVariable = excelText(string(whFieldInfo:buffer-value, whFieldInfo:format)).
else
chrVariable = trim(string(whFieldInfo:buffer-value, whFieldInfo:format)).
end.
end case.
If chrVariable = ? then
chrLine = chrLine + "|".
else
chrLine = chrLine + chrVariable + "|".
end.
put stream Ostream unformatted
chrline skip.
get next {&browse-name}.
end.
This uses the query in the browse and goes round the table and we then add whats columns are in the browse (xheaders) to the string.
My question is that at the moment this is having to be done in every program is there a way to do this in a persistent procedure. Does the browse hold the data i need? Can i just pass the browse handle and make a string from that? the browse object gets a lot of what i want.. the column headings the columns i want but im not sure how to get hold of the data?
any ideas would be great cheers
ssss weq