Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]Positioning datas within a CELL in EXCEL

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Positioning datas within a CELL in EXCEL
 Login/Join
 
Guru
posted
Hi All,

I want to display Pagenumber kind of things in my EXCEL report.We're in 7611.

Please help me on this asap.

Colunname
1.------->Cell 1
2.-------->Cell 2
2.1. ----->Cell 3
2.2.
2.3.
3.
3.1.
3.1.1.----->Cell 8 and so on
3.1.1.1.
3.1.1.2.
3.1.1.3.
3.1.1.4.
3.1.2.
3.1.2.1.
3.1.2.2.
3.1.3.
3.1.4.
4.
4.1.
4.1.1.
4.1.2.
4.2.
4.3.
5.
6.

Is there any way(indentation) to implement this ?

I also understand, it might be achieve only through IF..ELSE..

DEFINE FILE TESTFINAL
INSTRLEN/D4 = ARGLEN(50, TEST, 'D4');
DES/D12 = IF INSTRLEN EQ 2 THEN 3 ELSE IF INSTRLEN EQ 4 THEN 2 ELSE IF INSTRLEN EQ 6 THEN 1 ELSE 0
END

TABLE FILE TESTFINAL
PRINT DES NOPRINT
BY TEST
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
TYPE=DATA,COLUMN=N1,JUSTIFY=LEFT,WHEN=DES EQ 3,$
TYPE=DATA,COLUMN=N1,JUSTIFY=CENTER,POSITION=1,WHEN=DES EQ 2,$
TYPE=DATA,COLUMN=N1,JUSTIFY=RIGHT,WHEN=DES EQ 1,$
ENDSTYLE
END

[IMG:right]C:\Documents and Settings\a533060\Desktop\1.JPG[/IMG]
I only can be able to align LEFT,RIGHT,(or)CENTER, but not to the desired position within a cell.

Any help me on this would be really appreciable.

Thanks,
Rifaz

This message has been edited. Last edited by: Rifaz,


-Rifaz

WebFOCUS 7.7.x and 8.x
 
Posts: 406 | Location: India | Registered: June 13, 2013Report This Post
Guru
posted Hide Post
Data would be not like you see before.

It would be

2.1 started from where 2 ends and 3.1.1. started from where 3.1 ends and 3.1.1.1 started from where 3.1.1. ends and so on.

1., 2., 3. started atmost Left in the column.

Please let me know if you don't understand. Unable to post an image.

Thanks,
Rifaz


-Rifaz

WebFOCUS 7.7.x and 8.x
 
Posts: 406 | Location: India | Registered: June 13, 2013Report This Post
Virtuoso
posted Hide Post
Well, if you want to display those values with sort of indentation you can create an alpha string with as many spaces as needed for each entry. You'll have to come with that logic yourself as you understand your data although it seems that you somehow already figured out how what the indentation length might be for each row as calculated in the "DES/D12" field in your DEFINE block.

When producing your report, just SET SHOWBLANKS=ON so your indentation will be kept when producing the Excel file.

DEFINE FILE TESTFINAL
MAX_PADDING/A30  = '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@';  <-- Adjust as needed for the longest padding you may have
DES/D12          = IF <your_logic_here_to_determine_how_many_indentation_spaces_to_use>;
PADDING/A30      = SUBSTR(30, MAX_PADDING, 1, DES, DES, PADDING);  <-- You'll have as many '@' as determined by 'DES'
PADDED_VALUE/A50 = PADDING || TEST;    <-- Assuming TEST is the field that contains your numbered elements
IND_VALUE/A50    = STRREP (50, PADDED_VALUE, 1, '@', 1, ' ', 50, IND_VALUE);
END

SET SHOWBLANKS=ON

TABLE FILE TESTFINAL
PRINT
        IND_VALUE
        TEST
ON TABLE PCHOLD FORMAT EXL2K
END



I could not test the code above but it's intended to be just a concept for you to try. The expected functionality is this: let's say that for an entry such as "3.1.1.1" your indentation logic determines that it should be displayed starting in position 8. So after running the code above I expect the internal variables to look like this:

TEST         -> '3.1.1.1.'                                             <- this is what you read from the database
MAX_PADDING  -> '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'
DES/D12      -> 8                                                      <- this is calculated somehow in your code
PADDING/A30  -> '@@@@@@@@                      '                       <- Sequence of 8 '@' chars
PADDED_VALUE -> '@@@@@@@@3.1.1.1.                                  '
IND_VALUE    -> '        3.1.1.1.                                  '   <- This is what will be displayed!!!



Hope this helps.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Guru
posted Hide Post
Thanks really for your reply,

I din't realize we're gonna made it, at first.It almost going to satisfy my requirement.

As, I'm at home, don't have real data's to repro. However, i tried using CAR master for MODEL field.

The problem is in STRREP, though it replaces '@' with '' that appears in PADDED_VALUE field and again it starts displaying the IND_VALUE datas from left instead with blank spaces before every data as expected.

Please run this in your house.

SET SHOWBLANKS = ON;
DEFINE FILE CAR
MAX_PADDING/A30 = '@@@@@@@@@@@@@@@@@@';
INSTRLEN/I5 = ARGLEN(24, MODEL,INSTRLEN);
DES/D12 = IF INSTRLEN EQ 3 THEN 1 ELSE IF INSTRLEN EQ 9 THEN 2 ELSE IF INSTRLEN EQ 11 THEN 3 ELSE IF INSTRLEN EQ 16 THEN 4 ELSE 7;
PADDING/A30= SUBSTR(30, MAX_PADDING, 1, DES, DES, PADDING);
PADDED_VALUE/A100 = PADDING || MODEL;
IND_VALUE/A100 = STRREP (100, PADDED_VALUE, 1, '@',1,' ',100, IND_VALUE);
END

TABLE FILE CAR
PRINT
MODEL
INSTRLEN
DES
PADDING
PADDED_VALUE
IND_VALUE
END

Correct me, if i'm wrong.

Thanks,
Rifaz


-Rifaz

WebFOCUS 7.7.x and 8.x
 
Posts: 406 | Location: India | Registered: June 13, 2013Report This Post
Virtuoso
posted Hide Post
Hi Rifaz, there are no ';' characters at the end of SET commands in WebFOCUS!

Please make sure the SET line reads exactly as originally posted:

SET SHOWBLANKS = ON


Then run the procedure again and make adjustments as you see fit. This should hopefully get you going and closer to achieving what you need. Smiler



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Guru
posted Hide Post
Awesome Smiler Smiler Smiler You made my day!!!

This is Resolved.

How to close this topic?

Thanks,
Rifaz


-Rifaz

WebFOCUS 7.7.x and 8.x
 
Posts: 406 | Location: India | Registered: June 13, 2013Report This Post
Virtuoso
posted Hide Post
You're welcome. Glad to have helped. You already "closed" it by prefixing it with "[SOLVED]" Wink



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]Positioning datas within a CELL in EXCEL

Copyright © 1996-2020 Information Builders