Focal Point
Bizarre PDF Drill-Down anomaly

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

February 27, 2008, 09:16 AM
nubi
Bizarre PDF Drill-Down anomaly
Hi All,

i have a bit of a weird error-

im using a PDF Drill-down report which runs another report; there are two rows of output.

if i use HTML output the drill-down works on both rows i try.

if i use PDF output the drill works on one row but not another.

so the data exists and the PDF format does work.

so whenever i try to drill on this one row in PDF it either crashes the agent straight away or runs and only returns data when you physically kill the agent.

This suggests its getting stuck in a loop despite it returning the data when HTML output is used and despite the PDF drill down working when a different row is selected.

to check this i ran the code but added:

WHERE RECORDLIMIT EQ 1

and it ran and returned one row but when i changed it to:

WHERE RECORDLIMIT EQ 2

it failed.

Im completely baffled, there is nothing logical in this error as ive proved the drilldown procedure works for both HTML and PDF output and that the data exists.

any ideas?

its driving me crackers!


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
February 27, 2008, 11:11 AM
Anatess
Hi Nubi,
PDF multidrill was not supported in 7.1.3. Not sure if it changed in 7.6.4
Check out this thread.


WF 8.1.05 Windows
February 27, 2008, 11:14 AM
Darin Lee
Does this fail regardless of the value you click on or is it always a single value that gets the error? What is the content of the record that is causing the crash? If it's only a problem when a specific set of parms is passed, maybe the record you are retrieving contains a special character that is confusing the PDF generator. Can you run the drill-down report by itself (not as a drill-down) temporarily using -DEFAULT to set the parameters to the values that are causing the problem?

Some things to start with--


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
February 27, 2008, 11:21 AM
nubi
quote:
Originally posted by Anatess:
Hi Nubi,
PDF multidrill was not supported in 7.1.3. Not sure if it changed in 7.6.4
Check out this thread.


Hi Antess,

Im not using PDF multidrill.


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
February 27, 2008, 11:30 AM
nubi
quote:
Originally posted by Darin Lee:
Does this fail regardless of the value you click on or is it always a single value that gets the error? What is the content of the record that is causing the crash? If it's only a problem when a specific set of parms is passed, maybe the record you are retrieving contains a special character that is confusing the PDF generator. Can you run the drill-down report by itself (not as a drill-down) temporarily using -DEFAULT to set the parameters to the values that are causing the problem?

Some things to start with--


Hi Darin,

I tried to keep my original post short so didn't mention what i have done.

-it's always the same value that gives the error- the only thing that differs between the one that works and the one that doesn't is an account number.

-im not sure it's a record that is causing a crash (despite what i said about the Recordlimit) but will check that by introducing a reverse sort on the report and trying it again to see if it fails after reading the first record or whether it's something in the record itself. Either way i can view the records contents if i set the output to HTML so know the request is being accepete and there is nothing syntactically wrong with it.

-there are no special characters being used and also the report does get returned in PDF format but only after the agent is killed off manually (assuming it hasn't already crashed).

-running it by itself produces the same error.

regards


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
February 27, 2008, 01:40 PM
Darin Lee
If it gives the same error when running it by itself, that eliminates the drilldown from being the problem. Your next step is probably to turn on server tracing for that job (either within the job itself or within the server console) and see what, if any, errors you are getting.

One thing to try that may give a quick answer is to turn on message viewer in DevStudio. Right next to the blue "Run" button there is a drop-down arrow. Click on that and click on "Message Viewer ON" This will give you a little diagnostic box at the bottom of the window when you run your report. If ind this extremely useful when testing PDF reports. in HTML, you can -SET &ECHO=ALL; and view source, but when running PDF reports, you can't see the code that is run. Message Viewer gives you the functionality. I just leave it on all the time in Dev Studio.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
February 28, 2008, 03:16 AM
nubi
Hi Darin,

yes ive been testing the output with message viewer on. As the syntax is ok and it's returning the report (once you kill the agent) the message viewer is not showing any errors in or has any lines that look out of the ordinary.


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
February 29, 2008, 07:28 AM
nubi
any other takers?

if not ill open a case with IB and let you know how it goes.


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
February 29, 2008, 10:25 AM
Darin Lee
did you look at the server traces yet?


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
March 03, 2008, 04:06 AM
nubi
Yes, everything looked ok from i could see.


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
March 03, 2008, 10:37 AM
Darin Lee
The agent can't crash without something showing up in the log. If you manually kill an agent, nothing should be returned at all. IF something IS coming back, then the procedure must be running correctly. Sounds like it may be looping. When you kill it, it sends back the last completed result. Do you have any branching in the code that occurs only when you select PDF format? Possibly a duplicate label?


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
March 03, 2008, 11:15 AM
nubi
Hi Darin,

I know what you mean- it is very odd.

Im thinking its a loop as well, yet there is nothing branching:

although it wont mean much to you this is my code which the drilldown runs.

 ENGINE SQLORA SET DEFAULT_CONNECTION PRODIFSL
-DEFAULT &TITLE     = 'Departmental Cost Analysis for Period'
-DEFAULT &WFFMT     = 'PDF'

-SET &ECHO=ALL;
SET PRINTPLUS=ON
SET BYDISPLAY=OFF
SET NODATA =''

JOIN CLEAR *

TABLE FILE IF1351_PO_COMMITS
PRINT POC AS 'Cost'
BY  ACCOUNT NOPRINT
BY  DEPT NOPRINT
BY  YEAR NOPRINT
BY  PERIOD NOPRINT
BY  ACCOUNTING_ID AS 'Pre, Accounting, ID'
BY  DATE AS  'Date'
BY  ORDER_NO AS 'Order,No
BY  LINE_NO AS 'Line, No'
BY  REL_NO AS 'Rel,No'
BY  TEXT AS 'Text'
BY  DESC AS 'Desc'
BY  USERNAME AS 'User'
BY  QTY AS 'Qty'
WHERE DEPT      EQ '&DEPT'
WHERE ACCOUNT   EQ '&ACCOUNT'
WHERE YEAR      EQ '&FINYEAR'
WHERE PERIOD    EQ '&FINPERIOD'
HEADING
" Ref: R1295 <+0> <+0>Commercial in Confidence<+0>Run on: &DATEDMYY "
"   <+0> <+0>                                                                   &TITLE"
"  Year: <YEAR<+0> Period: <PERIOD"
"  Department: <+0><DEPT"
"  Acct: <ACCOUNT"
FOOTING BOTTOM
" Page <TABPAGENO of <TABLASTPAGE "
"FSL Commercial in Confidence"
ON TABLE COLUMN-TOTAL POC
ON TABLE SET HTMLCSS ON
ON TABLE PCHOLD FORMAT &WFFMT
ON TABLE SET STYLE *
  UNITS=IN, PAGESIZE='A4', LEFTMARGIN=0.194444, RIGHTMARGIN=0.194444, TOPMARGIN=0.10000, BOTTOMMARGIN=0.00000,
  SQUEEZE=ON, ORIENTATION=LANDSCAPE,$

 TYPE=REPORT,COLUMN=ACCOUNTING_ID,WIDTH=.50,WRAP=.50,$

 TYPE=REPORT,COLUMN=TEXT,WIDTH=2.750,WRAP=2.750,$
 TYPE=REPORT,COLUMN=DESC,WIDTH=2.750,WRAP=2.750,$
 TYPE=REPORT,COLUMN=VOUCHER_TYPE,WIDTH=1.25,$
 TYPE=HEADING, BORDER-TOP=LIGHT, BORDER-COLOR=RGB(66 66 66), SIZE=10, COLOR='WHITE', BACKCOLOR=RGB(189 190 194), JUSTIFY=LEFT, HEADALIGN=INTERNAL, $
 TYPE=HEADING, LINE=1, ITEM=1, COLOR='BLUE',JUSTIFY=LEFT, WIDTH=1.097, BORDER-LEFT=LIGHT, BORDER-COLOR=RGB(66 66 66), $
 TYPE=HEADING, LINE=1, ITEM=2, COLOR='BLUE', JUSTIFY=LEFT, WIDTH=.792, $
 TYPE=HEADING, LINE=1, ITEM=3, STYLE=BOLD, WIDTH=7.550, JUSTIFY=CENTER, $
 TYPE=HEADING, LINE=1, ITEM=4, COLOR='GREEN',  JUSTIFY=RIGHT, WIDTH=1.889, BORDER-RIGHT=LIGHT, BORDER-COLOR=RGB(66 66 66), $
 TYPE=HEADING, LINE=2, ITEM=1, COLOR='BLUE',  JUSTIFY=LEFT, WIDTH=1.097, BORDER-LEFT=LIGHT, BORDER-COLOR=RGB(66 66 66), $
 TYPE=HEADING, LINE=2, ITEM=2, COLOR='BLUE', JUSTIFY=LEFT, WIDTH=.792, $
 TYPE=HEADING, LINE=2, ITEM=3, STYLE=BOLD, BORDER-RIGHT=LIGHT, WIDTH=7.550, $
 TYPE=HEADING, LINE=2, ITEM=4, WIDTH=1.889, BORDER-RIGHT=LIGHT, BORDER-COLOR=RGB(66 66 66), $
 TYPE=HEADING, LINE=3, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT, BORDER-COLOR=RGB(66 66 66), $
 TYPE=HEADING, LINE=4, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT, BORDER-COLOR=RGB(66 66 66), $
 TYPE=HEADING, LINE=5, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT,  BORDER-COLOR=RGB(66 66 66), $
 TYPE=HEADING, LINE=6, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT, BORDER-BOTTOM=LIGHT, BORDER-COLOR=RGB(66 66 66), $
 TYPE=TITLE   ,  BORDER=LIGHT, BORDER-COLOR=RGB(66 66 66)   , BACKCOLOR=RGB(189 190 194), STYLE=BOLD,JUSTIFY=CENTER,  $
 TYPE=REPORT  ,  FONT='ARIAL', SIZE=8,COLOR=RGB(102 102 102), BACKCOLOR='NONE'          , STYLE=NORMAL, $
 TYPE=SUBTOTAL,  BORDER=LIGHT, BORDER-COLOR=RGB(255 255 255), BOTTOMGAP=0.1             , BACKCOLOR=RGB(189 190 194), STYLE=-BOLD, $
 TYPE=FOOTING ,  BORDER=LIGHT, BORDER-COLOR=RGB(66 66 66)   , SIZE=10,BOTTOMGAP=0.1     , COLOR='WHITE', BACKCOLOR=RGB(189 190 194), JUSTIFY=CENTER, $
ENDSTYLE
END
 


its a pretty simple and standard request so am baffled.


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
March 03, 2008, 11:39 AM
PBrightwell
Is it possible that one of the fields you are passing contains a single or double quote? Is "-BOLD" on your subtotal style a typo? Have you checked your variable to make sure are passing what you think you are passing '?&'?


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
March 03, 2008, 11:44 AM
Darin Lee
quote:
TYPE=REPORT,COLUMN=VOUCHER_TYPE,WIDTH=1.25,$


Not sure if it makes any difference, but you're referencing a column in your stylesheet that doesn't exists in your report. Also TEXT is a reserved word in stylesheets. and DESC may be also. Try taking out the stylesheet stuf altogether and see what you get.

I also make it a habit to use a -DEFAULT for EVERY $variable that is used in my report (&DEPT, &ACCOUNT, &FINYEAR,&FINPERIOD) set to blank. Then, at least, I get a zero records if something is not passed correctly instead of an error message for a missing value. For me, anything that could cause an error is a suspect in cases like this.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
March 04, 2008, 02:43 AM
nubi
Hi Darin,

I think you are on to something, i can get it to run with all the style sheet stuff bar the two lines you say could cause me a problem:

TYPE=REPORT,COLUMN=TEXT,WIDTH=2.750,WRAP=2.750,$
TYPE=REPORT,COLUMN=DESC,WIDTH=2.750,WRAP=2.750,$

so am working out to get them to do what i need without these lines...

thanks you a star!


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
March 04, 2008, 04:04 AM
nubi
Does anyone know how i can wrap data other than suing wrap? the problem i ahev is that some of my users have a manaia for writing very long descriptions in free text fields such as the TEXT and DESC fields im using here.

The wrap statements is what causes my report to crash yet i really need to wrap the data, any workarounds?


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
March 04, 2008, 11:08 AM
nubi
Hi Guys,

Just a note to say 'ive' cracked it (when i say 'ive' i mean the resident expert here at work).

What the problem was was the fact that i was trying to wrap a BY field. Now this normally works and ive proved with the same report but for certain field lengths it fails. What this means is Wrap does work until you get to a certain length field and then it crashes the agent.

I don't know what is causing that but suffice to say i didn't need to sort on that field anyway (hey, im still learning) so have managed to 'fix' my report but ultimately not the problem.

so it's one to remember.

Thanks for all your suggestsions, you certainly managed to isolate the problem to a line of style sheet code and that helped immensely!

cheers

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


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor