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.
I'm trying to display a user-friendly representation of the report criteria in the header of a report that I'm working on. This is an HTML report, and I pass in region, district and territory IDs from the submission form, but I want to display the selected region/district/territory names rather than their IDs. I have a hold file that I -include for the form, that already does the lookups, so I -include that in the report as well, and reference it like so:
TABLE FILE TERR_DATA_HOLD
BY REGION_NAME
BY DISTRICT_NAME
BY TERRITORY_CLIENT_ID
WHERE REGION_ID EQ '&Region';
WHERE DISTRICT_ID EQ '&District';
WHERE TERRITORY_ID EQ '&Territory';
ON TABLE HOLD FORMAT ALPHA AS CRITERIA_NAMES
END
-RUN
-READ CRITERIA_NAMES &RegionCriteriaName.A30. &DistrictCriteriaName.A30. &TerritoryCriteriaName.A20.
-RUN
-SET &RegionCriteriaText = IF &Region EQ _FOC_NULL THEN 'All Regions' ELSE 'Region: ' | &RegionCriteriaName;
-SET &DistrictCriteriaText = IF &District EQ _FOC_NULL THEN 'All Districts' ELSE 'District: ' | &DistrictCriteriaName;
-SET &TerritoryCriteriaText = IF &Territory EQ _FOC_NULL THEN 'All Territories' ELSE 'Territory: ' | &TerritoryCriteriaName;
But when I display &RegionCriteriaName in the report header, it shows up as something like "000007Central". The length of the region name is placed at the start of the variable. I suppose I could just trim off the first 6 characters (since it appears to be consistently using 6 characters for the length), but I would rather understand why it is adding that, and if there is a better way to get the data into a variable.
I'm very new to WebFOCUS and I've learned most of what I know from the forums. Thanks for any help you can provide.This message has been edited. Last edited by: bhudson,
it is happening because your source is a variable length field and those first 6 or so numerics are the length of the text that it contains. basically, edit() it out.
Or just use the format on the request with a save.
TABLE FILE TERR_DATA_HOLD
SUM REGION_NAME/A30
DISTRICT_NAME/A30
TERRITORY_CLIENT_ID/A20
BY REGION_NAME NOPRINT
BY DISTRICT_NAME NOPRINT
BY TERRITORY_CLIENT_ID NOPRINT
WHERE REGION_ID EQ '&Region';
WHERE DISTRICT_ID EQ '&District';
WHERE TERRITORY_ID EQ '&Territory';
ON TABLE SAVE FORMAT
END
-RUN
-READ CRITERIA_NAMES &RegionCriteriaName.A30. &DistrictCriteriaName.A30. &TerritoryCriteriaName.A20.
-RUN
Thanks all. ABT's solution took care of the issue. However, I think Waz's idea will result in more succinct code in this particular case, so I'll probably update the code to do that instead.