Peter Kopp · Oct 17, 2018
SQLGateWay performance.

I have a ZEN page with nine tablepanes. Each tablepane queries a table in the same SQLServer db. I have a single SQLGateWay(odbc) to this SQLServer db. I need to get better performance when I query all nine table at the same time. Would my performance improve if I had nine SQLGateWays(nine odbc configurations/connections), one for each query? I would appreciate any and all suggestions for getting the very best performance when using SQLGateWays. Thank you.

0 1 133

This code snippet provides a ZEN page that downloads a stream from its database directly:

/// We assume that you have stored your data within this schema:
/// MyApp.Model.Storage: Filename,FileSize,Content,ContentType
Class zen.downloadStream Extends (,%CSP.StreamServer)
    /// Wrapper to get the id of the download, we assume that the id is passed to this zen page
    /// as a URI parameter, i.e.: MyApp.Downloads.cls?OID=1234
    ClassMethod GetId()
        Quit $Get(%request.Data("OID",1))
    /// Set the appropriate header for the file.
    ClassMethod OnPreHTTP() As %Boolean
        Set tId = ..GetId()
        If ##Class(MyApp.Model.Storage).%ExistsId(tId) {
            Set tStream = ##Class(MyApp.Model.Storage).%OpenId(tId)
            // You could "guess" the content type by its file extension
            // or you can store it (before) in the database separately (like in this example).
            // Set Extension = $Piece(tStream.Filename,".",$Length(tStream.Filename,"."))
            // Set ContentType = ..FileClassify(Extension)
            Set %response.ContentType = tStream.ContentType
            Do %response.SetHeader("content-disposition","attachment; filename="_tStream.Filename)
            Do %response.SetHeader("Content-Length",tStream.FileSize)
        Else {
            Set %response.Status="404 File Not Found"
            Quit 0
        Quit $$$OK
    ClassMethod OnPage() As %Status
        Set Download = ##Class(MyApp.Model.Storage).%OpenId(..GetId())
        Do Download.Content.OutputToDevice()
        Quit $$$OK

Link to code on GitHub

2 1 308

Hi everyone

I have a datacombo that displayes value from a db table.

I would like to set one of this value as default value. How can I do that? Is there a way to say selected value given the text or the Id from the DB table?

Thanks a lot and kind regards


0 1 142

I have edited the Clinical Viewer portal. 

I made a new timeline with Patient Encounters. Did this using a external javascript outside Zen Component used for current chartbook.

So, i need to call function inside Zen Component. When i choose any encounter in current timeline is invoked a function, is name is SelectOneEp(' PatientID HERE ',''), i need help how to invoke this method in Zen Component estructure.

I already did the call from external JavaScript.

0 0 190


we are moving an existing ZEN-Application to a new version of Caché (2017.2.2). It is a rather old application and we need to do some modifications due to the thightend security of ZEN in this and prior release (we came from 2013.1). One of the changes required is to alter a table Name of a ZEN-Table on the server-side. Anyway this gives us a problem, since we receive an error

ERROR #5001: Client modification of protected property ( tableName) disallowed for security reasons.
SOURCELEMENT: %ZEN.Component.tablePane (tpSimilarity)

0 2 290
Sebastian Thiele · Jul 31, 2018
Use Fallback CSS mode

Hi everybody,

we have some legacy ZEN applications build upon CSS2 style definitions. We moved the application due to an upgrade to a newer version of cache (2017.2.1). Anyway I have in mind that in one of the prior relases css3 style interpretation was enforced by ZEN and you could explecitly tell the framework to use CSS2 by setting a global. Anyway I can´t found any hints in the docs on that. Does anyone of the %ZEN gurus have this in mind?

best regards,


0 1 129
Rodrigo Flores · Jun 28, 2018
Filter in table


is there way when select a value in filter column and the second column filter use only value referred to the first selection??

we use to active filter to column in table, but not know how relationship the filter between columns of table.

only in the table context in zen page.

0 1 148

I have this local, containing a list of books of arbitrary length:

set books=2
set books(1, "author") = "Alice"
set books(1, "title") = "Hello"
set books(1, "pages") = "123"
set books(2, "author") = "Bob"
set books(2, "title") = "World"
set books(2, "pages") = "456"

And I want to generate this PDF (there could be more than two tables), each book is a separate table:

The header is always the same (Author, Title, Page) but the number of tables would be different.

0 3 484
Ruslan K · Jun 14, 2018
AddEventListener for a control

Is there a way to add event listener for a zen control?

I have a custom text control and I want to add 'change' event listener for it.

Is it possible to do not using 'onchange' property? 

0 3 225
Peter Kopp · Jun 4, 2018
link component on a ZEN page

When using the link component on a ZEN page the default behavior is for the link to appear to the right of the tablepane row. Has anybody changed this behavior so the link appears to the left of the tablepane row? Thank you in advance for any and all feedback.

0 0 116
Peter Kopp · May 24, 2018
image tab

Good afternoon, I have a tabGroup where I populate tabs with images using the scr property. If a user scrolls to the bottom of the image on a tab, when they go to the next tab, they are also at the bottom. When moving between tabs, I would like the user to always be presented with the top of the tab content. I have not been unsuccessful in doing this. Would someone have input on how to make this happen? Thank you in advance for any and all feedback.

0 2 181
Philip McClean · Mar 14, 2018

I have a ZEN report set up to generate a file for loading to into excel (see attached). Even though I have DEFAULTMODE set to "excel" the resulting output file that I get on one CACHE instance is .xml while on another it is .xls. This is even though I run the report from the two instances on the same PC. Can anyone suggest what I am doing wrong? The Cache version is "Cache for UNIX (IBM AIX for System Power System-64) 2013.1.6 (Build 950_1) Fri Jun 6 2014 17:43:51 EDT"

0 4 278
Davidson Espindola · Apr 29, 2017

Hello friends,
I am having the following problem when passing a parameter in the execution of a zen query?
If the parameter has more than 50 characters of the error.
Http://"José Roberval Benedito da Silveira Gonçalves Sobrinho "

Is there a configuration or solution to this problem?


Davidson Espindola

0 4 460

I have a dataListBox in ZEN which has an OnDrawItem method associated with it. The DrawItem method never seems to be called and I cannot see why.  I am using IE11. Can anyone suggest a reason? The attached code runs in a namespace called CODE and can be run using view webpage on the TheLabsApp.BioAnal class. Please note that the data is in a global called ^%ANAL that resides in %SYS.

0 3 151

Hi Guys,

I would to know, I have a drop down list items in my applications. While, am clicking on the drop down bx, there are few numbers of listed items, while am doing mouse over action, I should display the entire text of selected item from that drop down list box, even am not selecting that item. I would like to know about the what is exact text it contains in Zen framework. 

If any lead would be appreciated. 

Thank you in advance. 

0 13 837


I would like to set the report headerHeight dynamically based on a group records count.


If GroupA has 5 records then the headerHeight should be 50mm

If GroupA has 3 records then the headerHeight should be 30mm


Could you please advice the best approach to achieve this?


Thank you,


0 1 137