Jump to content

We can Open an Excel file from our share via a hyperlink. Is...


robert fuschetto

Recommended Posts

One option could be the following

For Excel

APP HOLD baseapp

END

TABLE FILE CAR

PRINT MODEL

BY COUNTRY

BY CAR

ON TABLE HOLD AS TEST_SAVE FORMAT XLSX

ON TABLE SET BYDISPLAY ON

END

-RUN

 

APP HOLD

END

 

-SET &COPYF = '\yourServerNameyourSharedDriveNametest_save.xlsx';

 

-DOS COPY e:ibiappsbaseapptest_save.xlsx &COPYF

-DOS DEL e:ibiappsbaseapptest_save.xlsx

-DOS DEL e:ibiappsbaseappibitmime.htm

For PDF

APP HOLD baseapp

END

TABLE FILE CAR

PRINT MODEL

BY COUNTRY

BY CAR

ON TABLE HOLD AS TEST_SAVE FORMAT PDF

ON TABLE SET BYDISPLAY ON

END

-RUN

 

APP HOLD

END

 

-SET &COPYF = '\yourServerNameyourSharedDriveNametest_save.pdf';

 

-DOS COPY e:ibiappsbaseapptest_save.pdf &COPYF

-DOS DEL e:ibiappsbaseapptest_save.pdf

Link to comment
Share on other sites

This can be done if the reporting server machine has access to a UNC path where the PDF files are to be written. PC Magazine definition of UNC

Then your fex can APP MAP to the UNC location:

APP MAP appname "\servernamepath"

 

TABLE FILE CAR

PRINT CAR

ON TABLE HOLD AS appname/report.pdf FORMAT PDF

END

 

Above example is for Windows OS, in Unix it would be a little different.

Link to comment
Share on other sites

a little out of my space but here is what I triedI figure perhaps my share path is the wrong syntaxor my app path.

I noted we have ONE other report that opens an Excel Template in basappso I thought syntax might be similar to this:

ON TABLE HOLD AS tab1 FORMAT XLSX TEMPLATE &APPROOT/baseapp/formtemplatelandscape.xltm SHEETNUMBER 2

Anyway, this code created. The pdf in baseapp I see it. Then it just hands with this:

 

Not sure whats uphere is the code

APP HOLD baseapp

END

TABLE FILE CAR

PRINT MODEL

BY COUNTRY

BY CAR

ON TABLE HOLD AS LVPG_CARS_TEST FORMAT PDF

ON TABLE SET BYDISPLAY ON

END

-RUN

APP HOLD

END

-SET &COPYF = X:ReportsLatestDataLVPG_CARS_TEST.pdf;

-DOS COPY &APPROOT/baseapp/test_save.pdf &COPYF

-DOS DEL &APPROOT/baseapp/test_save.pdf

Link to comment
Share on other sites

I can only tell you that the syntax when we add hyperlinks to HTML pages is this:

X:LVPGReportsCEO DASHBOARDLatestDatafilename.pdf

where filename is one of the PDFs. Click the link form the HTML page an it opens.

Dave,

thanks the code ran but did not place the file there.

Martin,

If I run this code:

APP HOLD baseapp

END

TABLE FILE CAR

PRINT MODEL

BY COUNTRY

BY CAR

ON TABLE HOLD AS LVPG_CARS_TEST FORMAT PDF

ON TABLE SET BYDISPLAY ON

END

-RUN

APP HOLD

END

-SET &COPYF = X:LVPGReportsCEO DASHBOARDLatestDataLVPG_CARS_TEST.pdf;

I see the file appear under baseapp. I get no errors.

If I delete the file then run again with these additional two lines:

-DOS COPY &APPROOTbaseapptest_save.pdf &COPYF

-DOS DEL &APPROOTbaseapptest_save.pdf

I get this:

and it just runs forever and the file is NEVER created in baseapp.

I have seen the &APROOT reference in one fex that opens and excel template in baseapp.

I am not sure where it gets stuck

Link to comment
Share on other sites

also if I run the this codesame PROMPT appearsloading for everno file creationso I am not sure the x drive refernce is the issue.

APP HOLD baseapp

END

TABLE FILE CAR

PRINT MODEL

BY COUNTRY

BY CAR

ON TABLE HOLD AS LVPG_CARS_TEST FORMAT PDF

ON TABLE SET BYDISPLAY ON

END

-RUN

APP HOLD

END

-*-SET &COPYF = X:LVPGReportsCEO DASHBOARDLatestDataLVPG_CARS_TEST.pdf;

-DOS COPY &APPROOTbaseapptest_save.pdf &COPYF

-DOS DEL &APPROOTbaseapptest_save.pdf

Link to comment
Share on other sites

I dont think whatever you are doing for HTML hyperlinks is going to lead to the answer. I think you need to find out how you could access the folder:

LVPGReportsCEO DASHBOARDLatestData

 

from Windows Explorer or command line. You could start with what you have access to, but ultimately it needs to be accessible to the reporting server.

Link to comment
Share on other sites

ok, but when I comment out the X drive and copy linesshould it not create the file and delete it without locking up or prompting for parameters that are not present and say: Loadingit does not do so see this code:

APP HOLD baseapp

END

TABLE FILE CAR

PRINT MODEL

BY COUNTRY

BY CAR

ON TABLE HOLD AS LVPG_CARS_TEST FORMAT PDF

ON TABLE SET BYDISPLAY ON

END

-RUN

APP HOLD

END

--SET &COPYF = X:LVPGReportsCEO DASHBOARDLatestDataLVPG_CARS_TEST.pdf;

--DOS COPY &APPROOTbaseapptest_save.pdf &COPYF

-DOS DEL &APPROOTbaseapptest_save.pdf

Id think the result should be:

 

creates the file in baseapp

Deletes it

Instead I get this:

Link to comment
Share on other sites

As @david.beagan points out - the first thing to do is see if your WebFOCUS Reporting Server can reach the X: drive.

Remember your WFRS may not be able to see mapped drives depending on the user ID used to start the serice. The UNC name should work though if you need that.

Make sure you can actually get WebFOCUS to reach your X: drive. if that fails (like doing the -DOS DIR), try doing an OS command with the UNC name ( \whateverfolder).

Seems like Davids original suggestion of APP MAP \whateverfolder looks like the most direct route to go. Lots of ways to get this done - even FTP if you had to. But APP MAP with HOLD AS appname/report.pdf seem pretty compact and smart.

Link to comment
Share on other sites

Well, 3 things need to happen:

 

Get the file to bassappThis seems to work!

Copy the filelets forget that for the moment.

Delete the file from baseapp

 

If we could focus on thisdeleting the fileno luck tried this:

-DOS DEL &APPROOT. $baseapptest_save.pdf

and this

-DOS DEL &APPROOT$. baseapptest_save.pdf

THE DOLLAR SIGN REPRESENTS A SPACE (ie hit the space bar.)

No erros, just says WebFocus No outputbut the file remainseven if I refresh descendants. It is not deleting it.

So I know I am good to this point, just need to get the DELETE syntax right while my colleague investigates the X drive piece.

APP HOLD baseapp

END

TABLE FILE CAR

PRINT MODEL

BY COUNTRY

BY CAR

ON TABLE HOLD AS AAALVPG_CARS_TEST FORMAT PDF

ON TABLE SET BYDISPLAY ON

END

-RUN

APP HOLD

END

Link to comment
Share on other sites

robertf:

 

-*-SET &COPYF = X:LVPGReportsCEO DASHBOARDLatestDataLVPG_CARS_TEST.pdf;

-DOS COPY &APPROOTbaseapptest_save.pdf &COPYF

 

 

THANKS2/3 of the way there! The delete works. Now my issue is referencing the sharethat X drive!

I assume all is good below EXCEPThte &COPF =

APP HOLD baseapp

END

TABLE FILE CAR

PRINT MODEL

BY COUNTRY

BY CAR

ON TABLE HOLD AS AAALVPG_CARS_TEST FORMAT PDF

ON TABLE SET BYDISPLAY ON

END

-RUN

APP HOLD

END

-SET &COPYF = X:LVPGReportsCEO DASHBOARDLatestDataAAALVPG_CARS_TEST.pdf;

-DOS COPY &APPROOTbaseappAAALVPG_CARS_TEST.pdf &COPYF

-DOS DEL &APPROOTbaseappAAALVPG_CARS_TEST.pdf

Link to comment
Share on other sites

If you run

-TYPE Hello World

 

do you get nothing back I seen a few environments where only report outputs come back but the rest like we are doing comes back empty. I never understood why.

I guess you could try this:

-DOS dir "X:LVPGReportsCEO DASHBOARDLatestData" > &APPROOT..baseappdirout.txt

 

And then look at the dirout.txt file in baseapp see the result. Even if the reporting server has this read access, it may not have write access that you would need to put a PDF there.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...