Zen Report that uses GlobalCharacterStreams

78 views
Skip to first unread message

Cam

unread,
Nov 16, 2009, 8:12:56 PM11/16/09
to InterSystems: Zen Community
Guys,

I have created a ZEN Report that uses a property that is of type
"%Library.GlobalCharacterStream" which equates to a LOGVARCHAR. When
the data for this property is written to the Zen Report XML in the
ReportDefinition it is in a binary format which causes the XML to b
invalid. Can someone please show me how I can print data from these
properties in a ZEN Report.

Regards

Cam

Derek Day

unread,
Nov 17, 2009, 9:10:13 AM11/17/09
to intersys...@googlegroups.com, Cam
How do you want this binary data exposed? You might want to add a text
stream or text string field that filters out any illegal binary
characters from your data, or you might want to use a proper url and
expose this binary data as images for example.

In general binary data should be stored in a %Stream.GlobalBinary rather
than a %Stream.GlobalCharacter (or for upgrades from 5.0.x
%Library.GlobalBinaryStream rather than %Library.GlobalCharacterStream).
This would give you some chance of the data working "automatically".

~Derek


Cam wrote (11/16/09 8:12 PM):

Cam

unread,
Nov 17, 2009, 3:49:47 PM11/17/09
to InterSystems: Zen Community
Derek,

I'm just using these fields for storing text which I didn't really
want to put a limit on the length. Therefore I just want to expose the
data as text.

Regards

Cam.
> > Cam- Hide quoted text -
>
> - Show quoted text -

Derek Day

unread,
Nov 17, 2009, 4:22:19 PM11/17/09
to intersys...@googlegroups.com
Then, I would clean up the data to remove the bad data... Bad data is ...well bad. =)
--
You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
To post to this group, send email to InterSys...@googlegroups.com
To unsubscribe from this group, send email to InterSystems-Z...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/InterSystems-ZEN?hl=en
Zen Community Terms and Conditions: http://groups.google.com/group/InterSystems-ZEN/web/community-terms-and-conditions

Steve Pisani

unread,
Nov 18, 2009, 11:44:24 PM11/18/09
to InterSystems: Zen Community
Hi Derek.

I thing there is a misunderstadning. Cam does not have binary data in
this field of the database. The question is: how do I build an XML
document form my ZEN report when I have a property of type
%GlobalCharacterStream (that holds no binary data) in my database.


The property is declared as "%Libaray.CharacterStream".

The SQL statement in the XDataReportDefintion of

... sql="SELECT ID, CREATED, LAST_UPD, CREATED_BY, LAST_UPD_BY,
SUMMARY, DESCRIPTION
FROM CT.CTS_ISSUE_TEST
ORDER BY ID">

the resulting XML snippet looks like this:

<?xml version="1.0" encoding="utf-8" ?>
- <ListOfIssue>
- <Issue>
<ID>1</ID>
<CREATED>2009-11-19 11:01:38</CREATED>
<SUMMARY>Y2023</SUMMARY>
<DESCRIPTION> ^ct.dataS %Library.GlobalCharacterStream
^ct.dataS</DESCRIPTION>
</Issue>

See the ELEMENT of DESCRIPTION. These are the 'binary' characters Cam
was referring to. You can see this is not the contents of the stream,
but a reference to the stream.

What't the best way to populate <DESCRIPTION> with all the contents
from this stream field. I investigated expression and %val, but
wouldn't that hit the 32K (or more if long string si enabled) limit at
some stage internally ?


Steve
> For more options, visit this group athttp://groups.google.com/group/InterSystems-ZEN?hl=en
> Zen Community Terms and Conditions:http://groups.google.com/group/InterSystems-ZEN/web/community-terms-a...- Hide quoted text -

pfc

unread,
Nov 19, 2009, 12:47:44 AM11/19/09
to intersys...@googlegroups.com
Steve

I think you have hit the nail on the head
I can see the docs re streams
http://localhost:57773/csp/docbook/DocBook.UI.Page.cls?KEY=GOBJ_streams#GOBJ
_streams_declaring_odbc

And what you have to do there
And the ODBC projection is as a blob

But I wonder if ZEN Reports is doing the same sort of stuff as the ODBC
projection? - ie under the hood the ODBC recognises the stream type and
does the morphing to get the data from the stream class.

And I think this is the solution - ie for ZEN reports to do the morphing and
wrap the data up in a CDATA section.


One for Jonathan I think


Peter
ms-a...- Hide quoted text -
>
> - Show quoted text -

--
You received this message because you are subscribed to the Google Groups
"InterSystems: Zen Community" group.
To post to this group, send email to InterSys...@googlegroups.com
To unsubscribe from this group, send email to
InterSystems-Z...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/InterSystems-ZEN?hl=en
Zen Community Terms and Conditions:
http://groups.google.com/group/InterSystems-ZEN/web/community-terms-and-cond
itions

__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4621 (20091119) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



Derek Day

unread,
Nov 19, 2009, 1:35:09 AM11/19/09
to intersys...@googlegroups.com, Steve Pisani
Ahh, ok. The confusing part was "it is in a binary format which causes
the XML to be invalid." So the problem is that the Stream OID is being
directly put into the output instead of the stream data.

The XML Data is a stream itself so this shouldn't be a problem, but Zen
Reports would have to recognize that this is a stream(BLOB/LongVarChar)
column. I haven't done anything along these lines so someone who has
tried this/read the right paragraph in the documentation, or Jonathan
will need to answer this (please call the WRC if this is critical).


Steve Pisani wrote (11/18/09 11:44 PM):

Jonathan Levinson

unread,
Nov 19, 2009, 3:01:12 PM11/19/09
to intersys...@googlegroups.com
Please contact your sales engineer or InterSystems support to enter an enhancement request for ZEN Reports.

Best Regards,
Jonathan Levinson


-----Original Message-----
From: Cam [mailto:cmat...@coretec.com.au]
Sent: Tuesday, November 17, 2009 3:50 PM
To: InterSystems: Zen Community
Subject: [InterSystems-Zen] Re: Zen Report that uses GlobalCharacterStreams

--
You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
To post to this group, send email to InterSys...@googlegroups.com
To unsubscribe from this group, send email to InterSystems-Z...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/InterSystems-ZEN?hl=en
Zen Community Terms and Conditions: http://groups.google.com/group/InterSystems-ZEN/web/community-terms-and-conditions

landerson

unread,
Nov 30, 2009, 5:41:34 AM11/30/09
to InterSystems: Zen Community
Don't overlook the fact that you can pass the OID of the stream to a
cache method which can then open the stream and return the data!

Regards,
Lesley
Reply all
Reply to author
Forward
0 new messages