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.
Has anyone used Ghostscript commands (gsprint or gswin32c) before?
I am trying to use ghostscript gsprint command to print workorder(s) to a specified printer. We are in the process of migrating UNIX to Windows Server 2003. In UNIX the below code worked perfectly. The users where able to print a work order to multiple work orders. Now that WebFOCUS migrated to Windows I am tring to use ghost script but it seems like it only allows me to print one work order and gives an error when I try to print multiple work orders. The printer is set up correctly and we just updated the driver on the printer to handle postscript.
I am using &EXITRC to determine if it printed or not and when I try multiple work orders it comes back as 1 instead of 0.
I am pretty much just changing any UNIX commands to Window commands (WNNIT). I also tried using gswin32c commands and that didnt work either.
-SET &PRINTRC = &EXITRC; -SET &PRINTERRORS = IF &PRINTRC NE 0 THEN &PRINTERRORS || &SYS_I.&CNTR ELSE &PRINTERRORS;
-IF &PRINTRC NE 0 THEN GOTO ENDOFIT;
-SET &CNTR= &CNTR - 1; -GOTO TOPOFIT -* End of Loop
-SET &DESC = IF &PRINTRC EQ 0 THEN 'Your Work Order(s) have been sent to the printer ( &PRINTER.EVAL ).' - ELSE 'Your Work Order(s) were NOT printed on printer ( &PRINTER.EVAL ).Error Code: &PRINTRC.EVAL' ; -SET &PRINTMSG = IF &PRINTRC NE 0 THEN 'Printer is &PRINTER.EVAL' ELSE ' '; -SET &COLOR = IF &PRINTRC NE 0 THEN 'COLOR=RED,' ELSE ' '; -SET &PRINTERRORS2 = IF &PRINTRC NE 0 THEN &PRINTERRORS ELSE ' '; -RUN
TABLE FILE WMGWO01_WRK_ORD PRINT DT2 THE_WO COMPUTE RECCTR/I2 = IF RECCTR GE 210 THEN 1 ELSE RECCTR + 1; ROWCTR/I2 = IF RECCTR EQ 1 OR 31 OR 61 OR 91 OR 121 OR 151 OR 181 OR 211 THEN 1 ELSE ROWCTR + 1; COLCTR/I1 = IF RECCTR LT 31 THEN 1 ELSE IF RECCTR LT 61 THEN 2 ELSE IF RECCTR LT 91 THEN 3 ELSE IF RECCTR LT 121 THEN 4 ELSE IF RECCTR LT 151 THEN 5 ELSE IF RECCTR LT 181 THEN 6 ELSE IF RECCTR LT 211 THEN 7 ELSE 8; PGECTR/I5 = IF RECCTR EQ 1 THEN PGECTR + 1 ELSE PGECTR; ON TABLE HOLD WHERE SYS_I IN (&SYS_I_LIST); END -RUN
TABLE FILE HOLD HEADING "Page ""WMG0001-batch" "Work Order" " " " " " " " " " " " " "&DESC" "&PRINTERRORS2" SUM THE_WO AS '' BY PGECTR NOPRINT PAGE-BREAK BY ROWCTR NOPRINT ACROSS COLCTR NOPRINT
ON TABLE SET NODATA ' ' ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE SET ONLINE-FMT PDF ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * TYPE=HEADING, STYLE=BOLD, JUSTIFY=LEFT,SIZE=9,$ TYPE=HEADING, LINE=2, JUSTIFY=LEFT,$ TYPE=HEADING, LINE=3, JUSTIFY=RIGHT,$ TYPE=HEADING, LINE=4, JUSTIFY=CENTER,$ TYPE=HEADING, LINE=5, JUSTIFY=LEFT,$ TYPE=HEADING, LINE=6, JUSTIFY=LEFT,$ TYPE=HEADING, LINE=7, JUSTIFY=LEFT,$ TYPE=HEADING, LINE=8, JUSTIFY=LEFT,$ TYPE=HEADING, LINE=9, JUSTIFY=LEFT,$ TYPE=HEADING, LINE=11,JUSTIFY=CENTER,&COLOR $
TYPE=REPORT, PAGESIZE='SCREEN', UNITS=IN, SQUEEZE=OFF, SIZE=10, GRID=OFF, TOPMARGIN=0.01, BOTTOMMARGIN=0.01, TOPGAP=0.02, BOTTOMGAP=0.02, RIGHTGAP=0.03, LEFTGAP=0.03,$ TYPE=TITLE,STYLE=-UNDERLINE,$ ENDSTYLE END -RUN -EXITThis message has been edited. Last edited by: Kerry,
I did remove APP DELETEF &PATH before you replied to my post but it still doesn't work. How can I delay each print job? I looked online for an example on how to do this and couldnt find anything.
Below is the piece of code I placed in my fex file and it worked but even though I only placed a delay of 2 seconds it takes a long time to print 25 work orders. I even tried 1 second delay and it takes a long time. But it works! It's wierd when we were using UNIX commands before we switched to Windows it used to print the work orders fast.
The only downside is when the users needs to print 80 work orders its going to take a long time but its better then printing each work individually.
What I am doing is just printing one work order at a time by just looping through the code. From our application the user can select multiple work orders then it sends the batch printer they select and the unique work orders to the fex file which it loops through each work order.
Right now I am hitting against Windows. We were using UNIX which is was working perfectly fine but they wanted to move from UNIX to Windows Server 2003. The code I pasted above was just showing the difference in code from UNIX and Windows.
Yes, I am able to send the reports directly to the printer.