Focal Point
[SOLVED]Precision report

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6357001616

January 31, 2012, 12:05 PM
BI_Developer
[SOLVED]Precision report
Hi

I am using precision reports for the first time.
Here is my sample code with car file.
I am trying to right justify those 4 dollar values (fields) but I could not get it to work. Can anyone help me in this?

  
DEFINE FILE CAR
DC/D20.2M = DEALER_COST;
RC/D20.2M = RETAIL_COST;
WE/D20.2M = WEIGHT;
MP/D20.2M = MPG;

END

TABLE FILE CAR
HEADING
"Sales1: <DC"
"Sales2: <RC"
"Sales3: <WE"
"Sales4: <MP"
FOOTING
""
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE SET NEWLAYOUT ON 
ON TABLE SET COMPOSITION DEFAULT
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=9,
     NAME=Page,
     METADATA='>GUIDE>show=1,snap=1,<GUIDE<>GRID>show=1,snap=1,sizex=12,sizey=12,<GRID<>RULER>show=0,<RULER<',
$
TYPE=TITLE,
     STYLE=BOLD,
$
TYPE=HEADING,
     SIZE=12,
     POSITION=(2.000000 1.000000),
     NAME=Heading,
     STYLE=BOLD,
$
TYPE=HEADING,
     LINE=1,
     POSITION=(1.125000 1.125000),
     WRAP=ON,
     DIMENSION=(1.750000 0.250000),
     NAME=TEXT,
     PARENT=Heading,
     METADATA='anchor=0,parentanchor=0,flags=11,line=1,item=0',
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
     STYLE=NORMAL,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=FIELD,
     ITEM=1,
     COLOR='BLUE',
     JUSTIFY=RIGHT,
$
TYPE=HEADING,
     LINE=2,
     POSITION=(1.125000 1.375000),
     WRAP=ON,
     DIMENSION=(2.000000 0.250000),
     NAME=TEXT1,
     PARENT=Heading,
     METADATA='anchor=0,parentanchor=0,flags=1,line=2,item=0',
$
TYPE=HEADING,
     LINE=2,
     OBJECT=TEXT,
     ITEM=1,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
     STYLE=NORMAL,
$
TYPE=HEADING,
     LINE=2,
     OBJECT=FIELD,
     ITEM=1,
     JUSTIFY=RIGHT,
$
TYPE=HEADING,
     LINE=3,
     POSITION=(1.125000 1.625000),
     WRAP=ON,
     DIMENSION=(2.125000 0.250000),
     NAME=TEXT2,
     PARENT=Heading,
     METADATA='anchor=0,parentanchor=0,flags=1,line=3,item=0',
$
TYPE=HEADING,
     LINE=3,
     OBJECT=TEXT,
     ITEM=1,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
     STYLE=NORMAL,
$
TYPE=HEADING,
     LINE=3,
     OBJECT=FIELD,
     ITEM=1,
     COLOR='GREEN',
     JUSTIFY=RIGHT,
$
TYPE=HEADING,
     LINE=4,
     POSITION=(1.125000 1.875000),
     WRAP=ON,
     DIMENSION=(2.250000 0.250000),
     NAME=TEXT3,
     PARENT=Heading,
     METADATA='anchor=0,parentanchor=0,flags=1,line=4,item=0',
$
TYPE=HEADING,
     LINE=4,
     OBJECT=TEXT,
     ITEM=1,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
     STYLE=NORMAL,
$
TYPE=HEADING,
     LINE=4,
     OBJECT=FIELD,
     ITEM=1,
     COLOR='RED',
     JUSTIFY=RIGHT,
$
TYPE=FOOTING,
     SIZE=12,
     POSITION=(2.000000 8.000000),
     NAME=Footing,
     STYLE=BOLD,
$
TYPE=DATAMATRIX,
     NAME=Data Matrix,
     POSITION=(2.000000 2.000000),
     DIMENSION=(6.000000 6.000000),
     METADATA='focusverb=,flags=1>DB>anchor=0,parentanchor=0,flags=1,line=0,item=0<DB<',
$
ENDSTYLE
END



Thanks a lot..!!

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


WF 8.2.01 APP STUDIO
PDF,HTML,EXL2K,Active
January 31, 2012, 12:35 PM
njsden
That tool does not seem to be very intuitive. Trying to highlight a piece of text in the HEADING is useless. In true honesty all I may need is to actually read the Precision Painter manual (which I haven't done) and try and learn how to use it properly before even playing with it but this first impression was really not that great.

Anyhow, I managed to get what you want by manually giving a fixed WIDTH of 1.500 to each FIELD element in the HEADING.

Sorry, I could not find how to do that from the Properties window so I did it in the "Source" tab directly. I know, I know, we should never to that Wink

TABLE FILE CAR
HEADING
"Sales1: <DC"
"Sales2: <RC"
"Sales3: <WE"
"Sales4: <MP"
FOOTING
""
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE SET NEWLAYOUT ON 
ON TABLE SET COMPOSITION DEFAULT
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=9,
     NAME=Page,
     METADATA='>GUIDE>show=1,snap=1,<GUIDE<>GRID>show=1,snap=1,sizex=12,sizey=12,<GRID<>RULER>show=0,<RULER<',
$
TYPE=TITLE,
     STYLE=BOLD,
$
TYPE=HEADING,
     SIZE=12,
     POSITION=(2.000000 1.000000),
     NAME=Heading,
     STYLE=BOLD,
$
TYPE=HEADING,
     LINE=1,
     POSITION=(1.125000 1.125000),
     WRAP=ON,
     DIMENSION=(2.000000 0.250000),
     NAME=TEXT,
     PARENT=Heading,
     METADATA='anchor=0,parentanchor=0,flags=11,line=1,item=0',
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
     STYLE=NORMAL,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=FIELD,
     ITEM=1,
     COLOR='BLUE',
     JUSTIFY=RIGHT,
     WIDTH=1.500,
$
TYPE=HEADING,
     LINE=2,
     POSITION=(1.125000 1.375000),
     WRAP=ON,
     DIMENSION=(2.000000 0.250000),
     NAME=TEXT1,
     PARENT=Heading,
     METADATA='anchor=0,parentanchor=0,flags=1,line=2,item=0',
$
TYPE=HEADING,
     LINE=2,
     OBJECT=TEXT,
     ITEM=1,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
     STYLE=NORMAL,
$
TYPE=HEADING,
     LINE=2,
     OBJECT=FIELD,
     ITEM=1,
     JUSTIFY=RIGHT,
     WIDTH=1.500,
$
TYPE=HEADING,
     LINE=3,
     POSITION=(1.125000 1.625000),
     WRAP=ON,
     DIMENSION=(2.125000 0.250000),
     NAME=TEXT2,
     PARENT=Heading,
     METADATA='anchor=0,parentanchor=0,flags=1,line=3,item=0',
$
TYPE=HEADING,
     LINE=3,
     OBJECT=TEXT,
     ITEM=1,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
     STYLE=NORMAL,
$
TYPE=HEADING,
     LINE=3,
     OBJECT=FIELD,
     ITEM=1,
     COLOR='GREEN',
     JUSTIFY=RIGHT,
     WIDTH=1.500,
$
TYPE=HEADING,
     LINE=4,
     POSITION=(1.125000 1.875000),
     WRAP=ON,
     DIMENSION=(2.250000 0.250000),
     NAME=TEXT3,
     PARENT=Heading,
     METADATA='anchor=0,parentanchor=0,flags=1,line=4,item=0',
$
TYPE=HEADING,
     LINE=4,
     OBJECT=TEXT,
     ITEM=1,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
     STYLE=NORMAL,
$
TYPE=HEADING,
     LINE=4,
     OBJECT=FIELD,
     ITEM=1,
     COLOR='RED',
     JUSTIFY=RIGHT,
     WIDTH=1.500,
$
TYPE=FOOTING,
     SIZE=12,
     POSITION=(2.000000 8.000000),
     NAME=Footing,
     STYLE=BOLD,
$
TYPE=DATAMATRIX,
     NAME=Data Matrix,
     POSITION=(2.000000 2.000000),
     DIMENSION=(6.000000 6.000000),
     METADATA='focusverb=,flags=1>DB>anchor=0,parentanchor=0,flags=1,line=0,item=0<DB<',
$
ENDSTYLE
END





I'm anxious to see how this can be achieved directly in the GUI as that tool seems to have great potential.



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.
January 31, 2012, 12:39 PM
BI_Developer
I tried by manually typing in width and it worked but I wanted to see if there is something that can be done in GUI. So, I posted it here. Thanks for this..Smiler
quote:
Originally posted by njsden:
That tool does not seem to be very intuitive. Trying to highlight a piece of text in the HEADING is useless. In true honesty all I may need is to actually read the Precision Painter manual (which I haven't done) and try and learn how to use it properly before even playing with it but this first impression was really not that great.

Anyhow, I managed to get what you want by manually giving a fixed WIDTH to each FIELD element in the HEADING.

Sorry, I could not find how to do that from the properties window so I did it in the "Source" tab. I know, I know, we should never to that Wink

TABLE FILE CAR
HEADING
"Sales1: <DC"
"Sales2: <RC"
"Sales3: <WE"
"Sales4: <MP"
FOOTING
""
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE SET NEWLAYOUT ON 
ON TABLE SET COMPOSITION DEFAULT
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=9,
     NAME=Page,
     METADATA='>GUIDE>show=1,snap=1,<GUIDE<>GRID>show=1,snap=1,sizex=12,sizey=12,<GRID<>RULER>show=0,<RULER<',
$
TYPE=TITLE,
     STYLE=BOLD,
$
TYPE=HEADING,
     SIZE=12,
     POSITION=(2.000000 1.000000),
     NAME=Heading,
     STYLE=BOLD,
$
TYPE=HEADING,
     LINE=1,
     POSITION=(1.125000 1.125000),
     WRAP=ON,
     DIMENSION=(2.000000 0.250000),
     NAME=TEXT,
     PARENT=Heading,
     METADATA='anchor=0,parentanchor=0,flags=11,line=1,item=0',
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
     STYLE=NORMAL,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=FIELD,
     ITEM=1,
     COLOR='BLUE',
     JUSTIFY=RIGHT,
     WIDTH=1.500,
$
TYPE=HEADING,
     LINE=2,
     POSITION=(1.125000 1.375000),
     WRAP=ON,
     DIMENSION=(2.000000 0.250000),
     NAME=TEXT1,
     PARENT=Heading,
     METADATA='anchor=0,parentanchor=0,flags=1,line=2,item=0',
$
TYPE=HEADING,
     LINE=2,
     OBJECT=TEXT,
     ITEM=1,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
     STYLE=NORMAL,
$
TYPE=HEADING,
     LINE=2,
     OBJECT=FIELD,
     ITEM=1,
     JUSTIFY=RIGHT,
     WIDTH=1.500,
$
TYPE=HEADING,
     LINE=3,
     POSITION=(1.125000 1.625000),
     WRAP=ON,
     DIMENSION=(2.125000 0.250000),
     NAME=TEXT2,
     PARENT=Heading,
     METADATA='anchor=0,parentanchor=0,flags=1,line=3,item=0',
$
TYPE=HEADING,
     LINE=3,
     OBJECT=TEXT,
     ITEM=1,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
     STYLE=NORMAL,
$
TYPE=HEADING,
     LINE=3,
     OBJECT=FIELD,
     ITEM=1,
     COLOR='GREEN',
     JUSTIFY=RIGHT,
     WIDTH=1.500,
$
TYPE=HEADING,
     LINE=4,
     POSITION=(1.125000 1.875000),
     WRAP=ON,
     DIMENSION=(2.250000 0.250000),
     NAME=TEXT3,
     PARENT=Heading,
     METADATA='anchor=0,parentanchor=0,flags=1,line=4,item=0',
$
TYPE=HEADING,
     LINE=4,
     OBJECT=TEXT,
     ITEM=1,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
     STYLE=NORMAL,
$
TYPE=HEADING,
     LINE=4,
     OBJECT=FIELD,
     ITEM=1,
     COLOR='RED',
     JUSTIFY=RIGHT,
     WIDTH=1.500,
$
TYPE=FOOTING,
     SIZE=12,
     POSITION=(2.000000 8.000000),
     NAME=Footing,
     STYLE=BOLD,
$
TYPE=DATAMATRIX,
     NAME=Data Matrix,
     POSITION=(2.000000 2.000000),
     DIMENSION=(6.000000 6.000000),
     METADATA='focusverb=,flags=1>DB>anchor=0,parentanchor=0,flags=1,line=0,item=0<DB<',
$
ENDSTYLE
END





I'm anxious to see how this can be achieved directly in the GUI as that tool seems to have great potential.



WF 8.2.01 APP STUDIO
PDF,HTML,EXL2K,Active
January 31, 2012, 12:57 PM
njsden
BI_Developer, breaking each line in individual components may give you more flexibility in positioning and sizing them.

I did just that but even though apparently I can now change the dimension of the text by I haven't been able to figure out how to change the horizontal alignment (JUSTIFY) from the GUI. All of the alignment buttons are disabled no matter if I highlight the whole text box or it's content Mad

I can't see any applicable property either Confused




I can see that you have a JUSTIFY=RIGHT in your original code. How did you manage to do that in the GUI?



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.
February 03, 2012, 11:35 AM
njsden
quote:
How did you manage to do that in the GUI?

Guess I'll try to figure that out somehow myself. Yeah, yeah, I know I'm supposed to RTFM ...



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.
February 03, 2012, 11:39 AM
BI_Developer
That part of the code was written by me..not in GUI Smiler
quote:
Originally posted by njsden:
quote:
How did you manage to do that in the GUI?

Guess I'll try to figure that out somehow myself. Yeah, yeah, I know I'm supposed to RTFM ...



WF 8.2.01 APP STUDIO
PDF,HTML,EXL2K,Active
February 03, 2012, 12:13 PM
njsden
quote:
That part of the code was written by me..not in GUI

A-ha!

quote:
... I wanted to see if there is something that can be done in GUI ...


I thought you were trying to be a purist and wanted all to be GUI-driven Big Grin

Well, I think we all know better, don't we? Nothing beats the power of the "Source" tab 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.