Jump to content


Photo
- - - - -

XML output


14 replies to this topic

#1 LukeNeet

LukeNeet

    Member

  • Members
  • PipPip
  • 10 posts
  • Gender:Male

Posted 11 September 2006 - 12:59 PM

How do I use set_rptopt to output a specifc report to xml or csv. I can use $spool but this means creating a new report.

#2 Neil Hunter

Neil Hunter

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 414 posts
  • Gender:Male
  • Location:Johannesburg, South Africa

Posted 11 September 2006 - 01:07 PM

You now working on 5.5 ?

#3 Neil Hunter

Neil Hunter

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 414 posts
  • Gender:Male
  • Location:Johannesburg, South Africa

Posted 11 September 2006 - 01:12 PM

@RPTOPT = 8, [FILE_LOCATION]:OUTFMT=X (XML)
@RPTOPT = 8, [FILE_LOCATION]:OUTFMT=D (CSV)

Don't know about other users, but have found CSV generation from reports to be a bit on the dodgy side ...

#4 mikelandl

mikelandl

    Expert

  • Members
  • PipPipPipPip
  • 101 posts

Posted 11 September 2006 - 01:41 PM

Hi Neil,

What exactly do you mean by "dodgy"? Just curious as we're just starting to give the option to dump our reports out to a csv file. I really don't like the fact that you don't have the option to output any headings unless you manually do it yourself.

#5 Neil Hunter

Neil Hunter

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 414 posts
  • Gender:Male
  • Location:Johannesburg, South Africa

Posted 11 September 2006 - 02:39 PM

Had issues where long strings were getting truncated, (ie > 250 chars) even though page width was set to 999. Also some reports were intermittently breaking lines incorrectly.

Think I got round column headings by have a one time dummy cycle with the required fields that was called at entry of my main cycle.

This was all on 5.5r411, so I don't know if it has been fixed in subsequent releases B)

#6 LukeNeet

LukeNeet

    Member

  • Members
  • PipPip
  • 10 posts
  • Gender:Male

Posted 11 September 2006 - 02:44 PM

Hi Neil,

Give me the exact syntax when using @RPTOPT.
I have tried it with SET_RPTOPT and this does not work.
The manuals don't help either.
The syntax I am using is:

SET_RPTOPT('prntfile:OUTFMT=X','8','')
The above creates a file prntfile:OUTFMT=X

#7 mikelandl

mikelandl

    Expert

  • Members
  • PipPipPipPip
  • 101 posts

Posted 11 September 2006 - 02:49 PM

Thanks for the info Neil. I'll give the one time dummy cycle idea a try.

Haven't run across the > 250 chars issue yet but that then again I don't think any of our reports would be outputting that much although I could be wrong. We're running 5.5r345 so I don't know if anything has been fixed either. Hopefully version 6 would have fixed these issues.

Does anyone know why setting OUTFMT to D (or X for that matter) does not output headings? I can understand that there may be times where all you want is the actual field data but an option to print headings would be nice.

#8 Neil Hunter

Neil Hunter

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 414 posts
  • Gender:Male
  • Location:Johannesburg, South Africa

Posted 12 September 2006 - 06:07 AM

Hi Neil,

Give me the exact syntax when using @RPTOPT.
I have tried it with SET_RPTOPT and this does not work.
The manuals don't help either.
The syntax I am using is:

SET_RPTOPT('prntfile:OUTFMT=X','8','')
The above creates a file prntfile:OUTFMT=X

Like I had it listed above, I just forgot to put the quotes in.

eg @RPTOPT = '8,/maxi/tmp/test.csv:OUTFMT=D'

Haven't used SET_RPTOPT ...

#9 LukeNeet

LukeNeet

    Member

  • Members
  • PipPip
  • 10 posts
  • Gender:Male

Posted 12 September 2006 - 07:12 AM

I haven't used @RPTOPT. This is truly amazing since we both worked in the same company for something like 4 years.

#10 Neil Hunter

Neil Hunter

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 414 posts
  • Gender:Male
  • Location:Johannesburg, South Africa

Posted 12 September 2006 - 07:34 AM

:D

Its amazing what you learn in a new environment B)

#11 Guest_Old Fart_*

Guest_Old Fart_*
  • Guests

Posted 12 September 2006 - 07:38 AM

SET_RPTOPT is effectively obsolescent as it only does some of what @RPTOPT does.
USe @RPTOPT B)

#12 LukeNeet

LukeNeet

    Member

  • Members
  • PipPip
  • 10 posts
  • Gender:Male

Posted 12 September 2006 - 08:03 AM

In the 5.5r300 logic manual there is no SYNTAX guide for @RPTOPT only SET_RPTOPT.
Maybe there is another manual where it explains the syntax of @RPTOPT?

#13 Chris Mackenzie

Chris Mackenzie

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 368 posts
  • Gender:Male
  • Location:Bristol, United Kingdom

Posted 12 September 2006 - 10:29 AM

In the 5.5r300 logic manual there is no SYNTAX guide for @RPTOPT only SET_RPTOPT.
Maybe there is another manual where it explains the syntax of @RPTOPT?

FYI

Principles and Practices 55r300.pdf page 103
The content and views expressed in this message are those
of the poster and do not represent those of any organisation.

#14 YvetteBalt

YvetteBalt

    Member

  • Members
  • PipPip
  • 10 posts
  • Gender:Female

Posted 25 March 2008 - 01:56 PM

How do I use set_rptopt to output a specifc report to xml or csv. I can use $spool but this means creating a new report.



Hi Luke

Have you had any luck with that? We're on PROIV 6.1 and I'm trying to use SET_RPTOPT to dynamically change the output of a report to excel (whether it be via XML or CSV it doesn't matter).

I kinda get it right if I change the Spooler options to Output Type "XML - to Screen" Client File "report.xls" but cannot get it to work using SET_RPTOPT. ProIV sent me the following code:
SET_RPTOPT("CRT:OUTFMT=XEIZ", "11", "transform.xslt", "document.xls") but no luck.

Another way might be use the Output Type "Screen with Delimited Output" but I also can't even get that to work smoothly using the Spooler Options let alone using SET_RPTOPT. The little documentation on SET_RPTOPT doesn't really help either.

Kind Regards,

Yvette


#15 LukeNeet

LukeNeet

    Member

  • Members
  • PipPip
  • 10 posts
  • Gender:Male

Posted 26 March 2008 - 08:27 AM

Hi Evette,

Set_Rptopt works but is not being supported any more. You will have to use @RPTOPT to do what you are tryng. The syntax is as follows:

@RPTOPT = '8,' + $FILENAME + ':OUTFMT=X'

the filename has to have a .xml extension. You can find further details on the command in the principles and practice manual.

Hope this helps.





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users