Jump to content

How to use different styles across same data set?


Sean Kiss

Recommended Posts

I have one .fex file that is used to populate numerous reports across business functions. After that is secured I apply filters to narrow down to the data I want in additional fex files. This works fine. However, I need to add different grouping, styles, etc. What would be the best way to do that? Previously, I had one fex per combination leading to much duplication and chance for variance.

Ex:

-SET &WRK_CTR = '{var}';

-SET &WHS_ID = '{var}';

-SET &PRS_FLG = '{var}';

-SET &OUT_TYP = 'EXL07';

-SET &XWK = {var};

-INCLUDE IBFS:/WFC/{path}/{ReportName}.fex

Link to comment
Share on other sites

I don't know that I understand your question. Possibly the following WebFOCUS capability would help. Suppose you have a report like this:

TABLE FILE GGSALESSUM UNITS DOLLARSBY REGIONEND

and you need to make it more flexible in how it groups the data. Change it to look like this:

TABLE FILE GGSALESSUM UNITS DOLLARS&GROUPINGEND

You can run this and give and give &GROUPING a value of BY REGION. You could give it a value of BY REGION BY ST or even a value of BY REGION ACROSS PCD.

Link to comment
Share on other sites

David -

 

Thank you. I think your suggestion would help if were interested in changing the groupings exclusively. The bigger concern is different style sheets and column selections. I was hoping my 2nd fex could call the 1st fex and apply filters which it does. If I could then apply a variable style sheet after that, I think I would have what I need. It looks like once I use the filters and include the 2nd fex the code doesn't look at anything else to adjust the style.

 

1st fex is built which (for better or worse) has styling at the bottom of the code.

 

IBFS:/WFC/{path}/{ReportName}.fex

 

 

2nd fex is built based on the 1st with params to filter:

 

-SET &WRK_CTR = '{var}';

 

-SET &WHS_ID = '{var}';

 

-SET &PRS_FLG = '{var}';

 

-SET &OUT_TYP = 'EXL07';

 

-SET &XWK = {var};

 

 

 

-INCLUDE IBFS:/WFC/{path}/{ReportName}.fex

 

 

 

I was hoping I could add a style sheet at the bottom of the second or less enthusiastically as a 3rd fex. If I had several separate style sheets I could call those based on the params selected, but still am not able to see how that would work since the run appears to stop after the INCLUDE..

 

 

 

For a bit more context, the end user has asked for separate buttons to trigger the reports as opposed to using the filters. And they have asked for the reports to be scheduled deliveries in these various combinations as well as HTML views on a dashboard. Based on the dashboard there may be different style sheets for the HTML vs XLS versions.

 

 

 

There are 142 reports where were running off 24 sets of unique code. I have cut that approximately in half by integrating the HTML and XLS versions using the variable. I would ideally like to turn the 24 into 2 or 3 for code maintenance purposes. If you have any time available I would be happy to set up some time to discuss.

 

Thank You,

 

 

 

 

Sean Kiss

 

Software Developer

 

[cid:Motion_Logo_NEW_100x12_5258cfde-0b2d-43b7-af8f-13662c8d11d4.png]

 

1605 ALTON ROAD

 

BIRMINGHAM, AL 35210

T:205-895-3352

Sean.Kiss@motion.com | www.motion.com

 

This e-mail and any attachments may contain confidential information that is proprietary, privileged, and protected by applicable laws. If you have received this message in error and are not the intended recipient, you should not retain, distribute, disclose or use any of this information and you should destroy this e-mail, any attachments or copies therein forthwith. Please notify the sender immediately by e-mail if you have received this e-mail in error.

Link to comment
Share on other sites

Difficult to fully understand what you are looking for since you have not really share any code

But you can do a lot of thing with WebFOCUS such as below sample where styling is mananged by selected output (&WFFMT)

TABLE FILE ABCSUM MyMeasure AS 'Meas'BY MyBy AS 'By' HEADING"my header" FOOTING BOTTOM"my footing" -IF &WFFMT EQ 'XLSX' THEN GOTO HOLDXLS;ON TABLE PCHOLD AS '&RPT_TITLE.EVAL' FORMAT &WFFMT-GOTO NOLEAD-HOLDXLSON TABLE PCHOLD AS '&XLS_TITLE.EVAL' FORMAT &WFFMTON TABLE SET BYDISPLAY ON-NOLEADON TABLE SET PAGE-NUM NOLEADON TABLE NOTOTALON TABLE SET LINES 999999ON TABLE SET BYPANEL ONON TABLE SET HTMLEMBEDIMG ONON TABLE SET HTMLCSS ONON TABLE SET STYLE * -IF &WFFMT EQ 'HTML' THEN GOTO STYLHTML;-IF &WFFMT EQ 'PDF' THEN GOTO STYLPDF;-IF &WFFMT EQ 'XLSX' THEN GOTO STYLXLSX; -MRNOEDIT -INCLUDE myfolder/default_styling.fex-GOTO ENDSTYL -STYLHTML-MRNOEDIT -INCLUDE myfolder/html_styling.fex-GOTO ENDSTYL -STYLPDF-MRNOEDIT -INCLUDE myfolder/pdf_styling.fex-GOTO ENDSTYL -STYLXLSX-MRNOEDIT -INCLUDE myfolder/xlsx_styling.fex-GOTO ENDSTYL -ENDSTYLENDSTYLEEND-RUN
Link to comment
Share on other sites

Hi Sean, you stated that "... the run appears to stop after the INCLUDE." There is nothing inherent to the -INCLUDE that stops code from running that appears after the -INCLUDE. Perhaps there is a -EXIT in the included code? Perhaps there is some kind of mistake in the code that stops it? Maybe you could provide a simple code example that demonstrates the issue.

Link to comment
Share on other sites

David -

 

Thank you! I will flesh out a more complete code example, but it may be a few days before I get to it. Thank You again.

 

 

Sean Kiss

 

Software Developer

 

[cid:Motion_Logo_NEW_100x12_5258cfde-0b2d-43b7-af8f-13662c8d11d4.png]

 

1605 ALTON ROAD

 

BIRMINGHAM, AL 35210

T:205-895-3352

Sean.Kiss@motion.com | www.motion.com

 

This e-mail and any attachments may contain confidential information that is proprietary, privileged, and protected by applicable laws. If you have received this message in error and are not the intended recipient, you should not retain, distribute, disclose or use any of this information and you should destroy this e-mail, any attachments or copies therein forthwith. Please notify the sender immediately by e-mail if you have received this e-mail in error.

Link to comment
Share on other sites

I got it working.

 

What I ended up doing was compartmentalizing the process into separate fex files.

 

The 1st runs the main SQL

The 2nd fex INCLUDES the first and applies the related params

The 3rd fex INCLUDES the 2nd and applies the style, header, footer, etc.

 

So for my 100+ related reports, I can use the same 1st fex, and then deviate on the next two based on the params. There are 6 params whose various combinations would determine the final product.

 

I can use an IF THEN structure to select the final style set-up

 

Thank you for your help!

 

 

 

 

 

Sean Kiss

 

Software Developer

 

[cid:Motion_Logo_NEW_100x12_5258cfde-0b2d-43b7-af8f-13662c8d11d4.png]

 

1605 ALTON ROAD

 

BIRMINGHAM, AL 35210

T:205-895-3352

Sean.Kiss@motion.com | www.motion.com

 

This e-mail and any attachments may contain confidential information that is proprietary, privileged, and protected by applicable laws. If you have received this message in error and are not the intended recipient, you should not retain, distribute, disclose or use any of this information and you should destroy this e-mail, any attachments or copies therein forthwith. Please notify the sender immediately by e-mail if you have received this e-mail in error.

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...