Zen Reports message: Error loading stylesheet: Parsing an XPath expression failed.

68 مرّة مشاهدة
التخطي إلى أول رسالة غير مقروءة

Dawn Wolthuis

غير مقروءة،
01‏/06‏/2009، 8:09:19 ص1‏/6‏/2009
إلى InterSystems: Zen Community
We have another hour scheduled to work on Zen reports tomorrow. We are
getting the desired xml now so we need to address the display. By
using just what the Zen Reports wizard puts in the display area, we
get

Error loading stylesheet: Parsing an XPath expression failed.

From the doc, I see that <body></body> is required, but that is not
yet sufficient to get rid of the above error message. To help us have
success with our efforts tomorrow, what is minimally required to
display the results of the SQL Statement in a report like the
following? Thanks in advance. --dawn

Class Playground.my.firstReport Extends %ZEN.Report.reportPage [
Language = mvbasic ]
{

Parameter DEFAULTMODE = "html";

XData ReportDefinition [ XMLNamespace =
"http://www.intersystems.com/zen/report/definition" ]
{
<report xmlns="http://www.intersystems.com/zen/report/definition"
name="My Report"
sql='select ID, B,C
from S.T where G = ?'>
<parameter expression="..GetG()"/>

<group name ="ID" breakOnField="ID">
<attribute name="B" field="B" />
<attribute name="C" field="C" />
</group>
</report>
}

XData ReportDisplay [ XMLNamespace =
"http://www.intersystems.com/zen/report/display" ]
{
<report xmlns="http://www.intersystems.com/zen/report/display"
name="My Report" title="My Report">
<body>
</body>
</report>

}

Method GetG() As %Integer
{
return %session->Get("G",1)
}

}


--
Dawn M. Wolthuis

Take and give some delight today

Jonathan Levinson

غير مقروءة،
01‏/06‏/2009، 10:10:41 ص1‏/6‏/2009
إلى InterSys...@googlegroups.com
You can't have a space in the report name. That is why parsing an xpath
expression failed.
The report name is used to construct an xpath expression - the top level
one for parsing the XML.
Instead of name="My Report" try name="MyReport".

Best Regards,
Jonathan S. Levinson
Senior Software Developer
Object Group
InterSystems
617-621-0600

Dawn Wolthuis

غير مقروءة،
01‏/06‏/2009، 10:35:33 ص1‏/6‏/2009
إلى InterSys...@googlegroups.com
Sorry about that. I changed the name for the example and introduced
the space. Same error without it. Any other ideas?
Thanks. --dawn

Dawn Wolthuis

غير مقروءة،
01‏/06‏/2009، 10:38:01 ص1‏/6‏/2009
إلى InterSys...@googlegroups.com
Ah, the report name in the definition in the original was not
identical to the one in the display. That one did have a space in it.
That gets rid of the error, giving a blank page. Progress...

Thanks. --dawn
الرد على الكل
رد على الكاتب
إعادة توجيه
0 رسالة جديدة