robert fuschetto Posted February 17, 2021 Posted February 17, 2021 We can Open an Excel file from our share via a hyperlink. Is there a way to go about having WF create a pdf on the fly and write it to a share We are using AppStudio and on v8206.
Warren Hinchliffe Posted February 18, 2021 Posted February 18, 2021 When you say share what is it Network, or something else
robert fuschetto Posted February 18, 2021 Author Posted February 18, 2021 Yes, a spot outside of the WF reporting server. Example, Our X Drive server. So we can have hyperlinks to these places, can we save a document to them
Martin Yergeau Posted February 18, 2021 Posted February 18, 2021 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 ©F = '\yourServerNameyourSharedDriveNametest_save.xlsx'; -DOS COPY e:ibiappsbaseapptest_save.xlsx ©F -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 ©F = '\yourServerNameyourSharedDriveNametest_save.pdf'; -DOS COPY e:ibiappsbaseapptest_save.pdf ©F -DOS DEL e:ibiappsbaseapptest_save.pdf
David Beagan Posted February 18, 2021 Posted February 18, 2021 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.
robert fuschetto Posted February 18, 2021 Author Posted February 18, 2021 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 ©F = X:ReportsLatestDataLVPG_CARS_TEST.pdf; -DOS COPY &APPROOT/baseapp/test_save.pdf ©F -DOS DEL &APPROOT/baseapp/test_save.pdf
Martin Yergeau Posted February 18, 2021 Posted February 18, 2021 You need to specify the whole path not a reference to X drive which can be a reference to anything
David Beagan Posted February 18, 2021 Posted February 18, 2021 Or maybe you mean literally a drive X: if so then you could simply hold the PDF directly: FILEDEF LVPG_CARS_TEST DISK X:ReportsLatestDataLVPG_CARS_TEST.pdf TABLE FILE CAR PRINT MODEL BY COUNTRY BY CAR ON TABLE HOLD AS LVPG_CARS_TEST FORMAT PDF ON TABLE SET BYDISPLAY ON END
robert fuschetto Posted February 18, 2021 Author Posted February 18, 2021 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 ©F = 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 ©F -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
robert fuschetto Posted February 18, 2021 Author Posted February 18, 2021 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 ©F = X:LVPGReportsCEO DASHBOARDLatestDataLVPG_CARS_TEST.pdf; -DOS COPY &APPROOTbaseapptest_save.pdf ©F -DOS DEL &APPROOTbaseapptest_save.pdf
David Beagan Posted February 18, 2021 Posted February 18, 2021 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.
robert fuschetto Posted February 18, 2021 Author Posted February 18, 2021 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 ©F = X:LVPGReportsCEO DASHBOARDLatestDataLVPG_CARS_TEST.pdf; --DOS COPY &APPROOTbaseapptest_save.pdf ©F -DOS DEL &APPROOTbaseapptest_save.pdf Id think the result should be: creates the file in baseapp Deletes it Instead I get this:
David Beagan Posted February 18, 2021 Posted February 18, 2021 To delete: -DOS DEL &APPROOT.baseapptest_save.pdf the syntax is tricky if there is not a space immediately after &APPROOT.
David Beagan Posted February 18, 2021 Posted February 18, 2021 To see if the folder is accessible to the reporting server (double quotes around the path in case it has spaces): -DOS dir "X:LVPGReportsCEO DASHBOARDLatestData" Should see a directory result even if its empty.
Toby Mills Posted February 18, 2021 Posted February 18, 2021 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.
robert fuschetto Posted February 18, 2021 Author Posted February 18, 2021 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
robert fuschetto Posted February 18, 2021 Author Posted February 18, 2021 dang! I meant this: -DOS DEL &APPROOT$.baseappAAALVPG_CARS_TEST.pdf or -DOS DEL &APPROOT.$baseappAAALVPG_CARS_TEST.pdf neither work. $=space
robert fuschetto Posted February 18, 2021 Author Posted February 18, 2021 doesnt work w/out spaces either!.. I can manually delete the fileie highlight and hit the delete button so hopefully it is not a security thing.
David Beagan Posted February 18, 2021 Posted February 18, 2021 Sorry my mistake, you need two dots: -DOS DEL &APPROOT..baseappAAALVPG_CARS_TEST.pdf I just verified that it does work in my environment.
robert fuschetto Posted February 18, 2021 Author Posted February 18, 2021 robertf: -*-SET ©F = X:LVPGReportsCEO DASHBOARDLatestDataLVPG_CARS_TEST.pdf; -DOS COPY &APPROOTbaseapptest_save.pdf ©F 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 ©F = X:LVPGReportsCEO DASHBOARDLatestDataAAALVPG_CARS_TEST.pdf; -DOS COPY &APPROOTbaseappAAALVPG_CARS_TEST.pdf ©F -DOS DEL &APPROOTbaseappAAALVPG_CARS_TEST.pdf
robert fuschetto Posted February 18, 2021 Author Posted February 18, 2021 david.beagan: -DOS dir X:LVPGReportsCEO DASHBOARDLatestData tried this: nothing.
robert fuschetto Posted February 18, 2021 Author Posted February 18, 2021 I type this in the command line or IE and it opens the folder; no issue: X:LVPGReportsCEO DASHBOARDLatestData So close!
David Beagan Posted February 18, 2021 Posted February 18, 2021 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.
robert fuschetto Posted February 18, 2021 Author Posted February 18, 2021 This: -DOS dir X:LVPGReportsCEO DASHBOARDLatestData > &APPROOTbaseappdirout.txt yielded a text filealbeit empty. I may have to turn to our support. Id have felt better if I got an error or something.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now