Posts

Showing posts from February, 2016

IBI WebFOCUS - Formatting and aligining Across values in PDF output

Image
Dear Developers,  Recently I was working on a simple report using across. We had to justify values and data to right. It worked fine in HTML but when I generate the report in PDF, the issue I was facing is with the alignment. The data doesn't seems to appear properly aligned.  Please look at the screenshot: Initially it looked very simple but when I started looking for the alignment, it took pretty much of my time. So I thought it is worth sharing with all of you. Below is the sample code using CAR file: TABLE FILE CAR SUM SALES/D12.1 AS '' BY COUNTRY AS '' ACROSS CAR AS '' ON TABLE PCHOLD FORMAT PDF ON TABLE SET PAGE-NUM OFF ON TABLE SET STYLE * TYPE=REPORT,GRID=ON,SQUEEZE=ON, SIZE=7,$ TYPE=ACROSSVALUE,BACKCOLOR = GREY,COLOR=WHITE,STYLE=BOLD, JUSTIFY=RIGHT,WRAP=0.60,$ TYPE=REPORT,ACROSSCOLUMN=SALES,JUSTIFY=RIGHT,$ TYPE =ACROSSTITLE, BACKCOLOR = GREY,$ ENDSTYLE END And Screen shot of the output: Please share your

IBI WebFOCUS - Restricting calendar date range on the launch page dynamically using WebFOCUS procedure

Image
Dear Developers,  Recently we received a requirement where on the launch page, we wanted to restrict the user to select the dates in a specified date range. The requirement basically came up because in calendar, user can select 10 years past and future dates from current year. There is no point in allowing user to select a date for which data is not available or it is not relevant for the report. We can simply do this if the range is static and not going to change in future however that is not the scenario. We would need to do this from WebFOCUS procedure so that if the range changes in future, it should automatically reflect in the launch page. First for all, we would need to create a .fex file which will have similar content (here I am 4 years past and 3 years future dates) :  -* File: IBFS:/localhost/EDA/EDASERVE/APPPATH/pravin/purge_date.fex Created by WebFOCUS AppStudio DEFINE FILE CENTURYCUSTOMERS StDt1/MDYY=&MDYY; StDt2/MDYY=DATEADD(StDt1,'Y',-4); StDt3/M