REDIRECTING OUTPUT TO RTF FILE

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

salahaddin
Posts: 17
Joined: Thu Dec 11, 2014 7:11 am

REDIRECTING OUTPUT TO RTF FILE

Postby salahaddin » Mon Oct 17, 2016 3:32 am

Dear friends,

I have 2 problems:

1) When I redirect a table or any object to RTF files it works pretty well. My problem is that names of those objects do not show up in RTF file which makes it confusing. Assume I send 5 different vectors of coefficients to RTF file from 5 different regressions. When I open the RTF file I do not know which vector refers to which regression. So my question is how I can make object names to appear in RTF files?;

2) I want my comments to show up in RTF file. U can find one of my scripts below. I want green lines also show up in the rtf. I use output(r,o,c) but it does not help.

thanks in advance.

Sam
Attachments
hw4.prg
I want green comments to show up in rtf file.
(657 Bytes) Downloaded 555 times

EViews Jason
EViews Developer
Posts: 870
Joined: Tue Sep 16, 2008 3:50 pm

Re: REDIRECTING OUTPUT TO RTF FILE

Postby EViews Jason » Fri Oct 21, 2016 7:57 am

The 'output' command saves you from having to press the print button after an object is displayed and doesn't allow for any customization. If you want to annotate and add titles, you are better off using a spool object. In a spool you can turn on titles and add custom comments. Once you have finished adding all your objects to the spool at the end of your program you can print the spool to a rtf file.

Here is an example:

Code: Select all

create u 100 spool myspool myspool.options titles comments 'turn on titles and comments series x =rnd output(s) myspool pon 'automatically redirect all output to a spool !object = 1 %objectStr = @str(!object, "g02") x.line 'show and add the graph to the spool ' add comment to the first object myspool.comment untitled{%objectStr } "comment for first object" 'rename the first object myspool.name untitled{%objectStr } graph1 poff 'NOTE: the titles and comments will not appear in the RTF file unles 'Print titles' and 'Print comments' are checked in the file->print setup dialog output(r,o,c) "C:\temp\hw4.rtf" print myspool

salahaddin
Posts: 17
Joined: Thu Dec 11, 2014 7:11 am

Re: REDIRECTING OUTPUT TO RTF FILE

Postby salahaddin » Tue Oct 25, 2016 1:45 pm

thanks.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests