Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Excel in Report Library from local machine

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Excel in Report Library from local machine
 Login/Join
 
Platinum Member
posted
Hi all
We have a requirement where the client would like to see the report output (in excel format) and then send the report to the library if s/he wants to. The report in question has a lot of input parameters, so using the MRE Scheduling Wizard may be a turn-off for the users (we don't want users to enter the input parameters again for the same report that just got generated).

Request all of you to give me some suggestions on how to go about this.

What I have in my mind is to let the users run the report and get the report generated in Excel format. There could be another button (say) which invokes a script that is used to send this Excel (from C:temp) to WebFOCUS Report Library - possible/not possible ??

Any suggestions/pointers would be appreciated.

Thnks
Syed

This message has been edited. Last edited by: Syed,


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
Platinum Member
posted Hide Post
Alright! I understand that my requirement is a li'l weird Razzer

I tried using DSTRUN - it works fine. As in, I'm able to kick off an existing schedule frmo a fex (say run.fex). However, if I invoke run.fex on click of a button on the report, I'll have to pass all the parameters to RC for it to run the actual report. As mentioned in my post below, I'm trying to avoid passing parameters a second time, due to the large no. of input parameters (around 50).

Is there another way I can send the report to the library - I know that the reports are stored as BLOBs in Lib Admin tables - post

I was wondering if there's a way I could back-port the report to report library, and if anyone has done this in the past ?

Thanks
Syed


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
Platinum Member
posted Hide Post
No response !!
Tony/dhagen/Susannah/Kerry/Francis/others Confused

Any ideas?


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
Gold member
posted Hide Post
Report Caster can also handle an existing file. Run your report, save it, and then have RC pick up the saved file and put it into the library.


WF 7703M, XP/Win7, MRE, RC, BID, PMF, HTML, PDF, Excel 2000/7/10
 
Posts: 73 | Location: NY | Registered: February 06, 2007Report This Post
Platinum Member
posted Hide Post
Thanks Alex. That's a good idea.
In my case, however, RC will not have access to the local machine. I could save the report on a common server location which is accessible to RC. I'll need to write a micro/script for this.
I'll give it a shot.
In the meantime, if someone has any other suggestions, I'd really appreciate it.

Rgds
Syed


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
Expert
posted Hide Post
Syed, here's a concept that "may" work:

1. Output the report to the Reporting Server
2. Display the report to the user
3. If OK, FTP from server to Report Library
4. If not OK, rerun and overlay existing report.

Here's some code that creates a compound report and then displays to the user.
Take's longer to run, but, achieves desired result, hopefully.
  
-SET &ECHO=ALL;
-SET &FILE_NM = 'USER_RPT_' || &YYMD || '.XLS';
FILEDEF EXCELOUT DISK C:/IBI/&FILE_NM
-RUN
-SET &DO_TWICE = 1;
-BEGIN
DEFINE FILE CENTORD
  NEW_ORDER/YYM = ORDER_DATE;
  NEW_YEAR/YY   = ORDER_DATE;
END
TABLE FILE CENTORD
SUM
    QUANTITY
	  COMPUTE CNTR/I5 = IF NEW_YEAR EQ LAST NEW_YEAR THEN CNTR ELSE CNTR + 1;
BY NEW_YEAR
BY NEW_ORDER
BY PLANT
WHERE ORDER_DATE FROM '20010108' TO '20090114';
  ON TABLE HOLD AS GET_DATA
END
-RUN
TABLE FILE GET_DATA
SUM
    MAX.CNTR
 ON TABLE SAVE
END
-RUN
-READ SAVE &CNTR.I5.
-SET &PASSES = &CNTR;
-SET &XCNTR = 1;
-REPEAT DO_REPORT &PASSES TIMES
-SET &OPEN_CLOSE = IF &XCNTR EQ 1       THEN 'OPEN'
-             ELSE IF &XCNTR EQ &PASSES THEN 'CLOSE' ELSE ' ';
-SET &XTITLE = 'Report' | &XCNTR;

TABLE FILE GET_DATA
SUM
   QUANTITY
 BY PLANT
ACROSS NEW_ORDER
WHERE CNTR EQ &XCNTR;
-SET &OUTPUT = IF &DO_TWICE EQ 2 THEN 'ON TABLE PCHOLD FORMAT EXL2K '           | '&OPEN_CLOSE.EVAL' | ' NOBREAK' ELSE
-                                     'ON TABLE HOLD AS EXCELOUT FORMAT EXL2K ' | '&OPEN_CLOSE.EVAL' | ' NOBREAK' ;

&OUTPUT

ON TABLE SET STYLE *
     UNITS=CM,
     SQUEEZE=ON,
     ORIENTATION=LANDSCAPE,
$
TYPE=REPORT, SQUEEZE=ON, FONT='ARIAL', SIZE=7, TITLETEXT='&XTITLE.EVAL', $
ENDSTYLE
END
-RUN
-SET &XCNTR = &XCNTR + 1;
-DO_REPORT
-SET &DO_TWICE = &DO_TWICE + 1;
-IF &DO_TWICE GT 2 GOTO EOJ;
-GOTO BEGIN
-EOJ
-EXIT


hth


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Platinum Member
posted Hide Post
Hi Tom - I tried this (in parts) and it works !
Thanks for the suggestion.
The only problem is the re-run of the same report before the report output is generated. In my case, performance of the report is crucial - doubling the time spent in report generation may not be acceptable to the users.

I was also thinking on the lines of leveraging the temp directory (/ibi/7.1.7/ibi/WebFOCUS71) which is used to store the report output temporarily.
When I looked into this dir., I found the following files:
kbjejpbf.xht mxdokvvy.xht

Not sure if we can custom-name these files...
if somehow we could do that, we'll let RC pick up these temp files and send them to the library (based on an event - say a button click by the user).

Any thoughts ?

Thanks
Syed


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
Platinum Member
posted Hide Post
All - here's an interesting post by mgrackin.
I haven't read it completely, but I thought I should post this before anyone responds.

Cheers


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
Expert
posted Hide Post
Hey Syed,

Too bad you are on 7.1.7; 7.6.7 allows storing stuff in FOCCACHE, which would be ideal. I like Mickey's stuff, BUT, he's doing the same thing, running 2X.

You can build the looping AFTER extracting the data with the parameters, then HOLD. Then, you are not running 2X, but only once for the retrieval. Then do the LOOPS/-REPEAT to generate the reports...

Good Luck AND let us know. I'm sure quite a few would be interested...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Platinum Member
posted Hide Post
mgrackin has presented a very interesting way to deal with Printer Friendly versions of reports. But the post does not talk about controlling the names of temporary files which get created in CGI_TEMP_DIR.

Is there a way we could do that?


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
Platinum Member
posted Hide Post
I completely agree with you Tom.
It would have been great if I were using 7.6.x.
Alas!! Frowner

Nonetheless, I'm on it...will surely keep everyone posted.

Thanks much for your time..

Rgds
Syed


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
Platinum Member
posted Hide Post
3 hours and no luck so far Sweating - how can it be that we don't have a control on the temp files/filenames in WebFOCUS temp directory.
Am I missing something?

The .xht files that get created in temp directory have weird names (cdgxboua.xht, mdhtmgwd.tmp etc.) and the names also get changes every time I run the same report. If I could somehow customize these names, I should be able to achieve what I want !

Any pointers?

Rgds
Syed


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
Expert
posted Hide Post
Syed, maybe TEMPPATH will work for you:

-SET &TEMP_DIR1 = TEMPPATH(80,'A80');
-SET &TEMP_PATH = &TEMP_DIR1 || 'REPORT.xls';

FILEDEF EXCELOUT DISK &TEMP_PATH
-RUN
? FILEDEF
-EXIT

See if that will help..


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Platinum Member
posted Hide Post
Tom - this would set the report name in edatmp dir. What I am looking for is the WebFOCUS CGI_TEMP_DIR - commonly refered to as &IBI_DOCUMENT_ROOT/temp

Hope this makes sense.


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
Expert
posted Hide Post
Syed,

The &IBI_DOCUMENT_ROOT/temp is viewed/set via the Administrator Console under Configuration
Then, you have to pass it via Custom Settings, as Mickey showed in his post. Here

After, &IBITMP will be available...

EDIT: Typo

This message has been edited. Last edited by: Tom Flynn,


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Platinum Member
posted Hide Post
Gotcha! Let me work on this.

I'll also try to send the report directly to Report Library using FILEDEF.

One of these two options should suffice my requirement. I'll keep you posted.

Thanks again, for your help!

Syed


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
Platinum Member
posted Hide Post
This is what I did, and it works for a single file:

a) Wrote a fex:
1. Forced the creation of an excel file (say test.xls) in a specific directory location using FILEDEF.
2. Right after that, I used DSTRUN to trigger a schedule - this schdule picks up test.xls from the location specified in the task, and sends it to the library.

This is almost what I want, with the exception of the static filename. Since multiple users may access my report concurrently, I was trying to create a file with dynamic name based on user ID etc., and then this file should be sent to the library as and when it gets created.

As it turns out to be, RC does not allow dynamic filename to be entered in the 'File' section of a task.

Now, I can use Unix Copy (! cp ), but this would'nt be fool proof. There's a chance of files getting overwritten. Also, users will have to live with the same filename irrespective of who created it or when it was created.

While going through a post by Tony, I came across the following:
However, before you get too despondant, there is a method you could use, and that would be to have a pre process to set the file name in the RC dialog - which is actually held in one of the RC tables - to something you want. Not straight forward for a beginner but it is possible.

Could someone give me pointers on how to achieve this?

Everytime I think that I'm almost there, but then WebFOCUS puts a stumbling block Sweating

Still not giving up.......!!!

Thanks again
Syed


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
Platinum Member
posted Hide Post
Folks - just wanted to share with all of you what I have finally decided to go with. Let me list down the steps that I'm taking to send the report to Report Library on click of a button:

1. Create a schedule in RC – this job copies a temporary excel file from EDASRVE/MRE to Report Library
2. User clicks on ‘Send to Library’ button on the HTML Report
3. Check the status of Schedule created in Step# 1
4. If the schedule is being accessed by another user then
a. Sleep for 15 seconds
b. Go to Step# 3
Else Continue
5. Call a Stored Proc to set the Status of Schedule to ‘Start’
6. Invoke the report fex file to generate report in Excel format
7. Save this report in EDASRVE/MRE in excel format
8. Trigger the schedule created in Step# 1 using DSTRUN
9. Call a Stored Proc to set the Status of Schedule to ‘Stop’
10. End


Hope this helps some of us who are working on a similar issue.

Thanks
Syed


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Excel in Report Library from local machine

Copyright © 1996-2020 Information Builders