Good idea. This might work:


ClassMethod HandleJSON()
{
	S Results= {
		"ClassA":{"ClassName":"ClassA","ACount":367191880,"BCount":367191880,"CurrentDiff":0,"PreviousDiff":0,"ReportDate":"2024-03-02 00:00:00"},
		"ClassB":{"ClassName":"ClassB","ACount":5352149227,"BCount":5352149227,"CurrentDiff":0,"PreviousDiff":0,"ReportDate":"2024-03-02 00:00:00"}
	}
	
	w ..GetCsv(Results.%ToJSON())
}

ClassMethod GetCsv(json As %String) As %String [ Language = python ]
{
		
	import pandas
	
	df = pandas.read_json(json, orient="index")
	
	return df.to_csv(index=False)
}

Well, the result is not always the same: I just found out that you should be careful when working with :variables, for example in %SQLQuery:

select 1 where 'well...' %startswith :myvar

Returns 1 row for myvar being null.

Whereas

select 1 where 'well...' like :myvar||'%';

Does return no row for myvar being null.

Using IRIS for Windows (x86-64) 2021.1 (Build 215) Wed Jun 9 2021 09:56:33 EDT

Hi Marc,

I came across your post trying to get HTML markup correctly formatted into a Zen Report PDF. We did manage to get this done using a <write/> element's content attribute report-wide. This time, we need to get variable markup by a report data node - hence we need to use an <item/> element.

Unforunately we cannot get this to work, neither via copyhtml nor via copyxml (and combinations of the two).

Should not at least one of the alternatives below generate the desired bold typing of the parameters MYMARKUP or MYXML?

Thanks for looking into this!

Class test.ZenReportItemHtml Extends %ZEN.Report.reportPage
{ 

Parameter DEFAULTMODE = "pdf";

Parameter MYMARKUP = "<p><b>Testing HTML markup</b></p>";

Parameter MYXML = "<fo:block font-weight='bold'><fo:inline>Testing XML FO</fo:inline></fo:block>"; 

XData ReportDefinition [ XMLNamespace = "http://www.intersystems.com/zen/report/definition" ]
{
<report xmlns="http://www.intersystems.com/zen/report/definition" name="Test" runonce="true">
     <element name="MyMarkup" expression="..#MYMARKUP" />
     <element name="MyXML" expression="..#MYXML" /> 
</report>
} 

XData ReportDisplay [ XMLNamespace = "http://www.intersystems.com/zen/report/display" ]
{
<report xmlns="http://www.intersystems.com/zen/report/display" name="Test">     
    <document width="8.5in" height="11in" marginLeft="1.25in"
      marginRight="1.25in" marginTop="1.0in" marginBottom="1.0in">
    </document>
    <body>
        <line style="dotted" />
        <div style="font-weight:bold;"><item value="markup plain"/></div>
        <div><item field="MyMarkup" /></div>         

        <line style="dotted" />
        <div style="font-weight:bold;"><item value="markup copyhtml=true"/></div>
        <div><item field="MyMarkup" copyhtml="true" /></div>         

        <line style="dotted" />
        <div style="font-weight:bold;"><item value="markup copyhtml=true createtable=true"/></div>
        <div><item field="MyMarkup" copyhtml="true" createtable="true" /></div>         

        <line style="dotted" />
        <div style="font-weight:bold;"><item value="markup copyhtml86=true"/></div>
        <div><item field="MyMarkup" copyhtml86="true" /></div>         

        <line style="dotted" />
        <div style="font-weight:bold;"><item value="markup copyhtml=true copyhtml86=true"/></div>
        <div><item field="MyMarkup" copyhtml="true" copyhtml86="true" /></div>         

        <div style="margin-top:2em;"></div>

        <line style="dotted" />
        <div style="font-weight:bold;"><item value="xml plain"/></div>
        <div><item field="MyXML" /></div>         <div style="margin-top:2em;"></div>

        <line style="dotted" />
        <div style="font-weight:bold;"><item value="xml copyxml=true"/></div>
        <div><item field="MyXML" copyxml="true" /></div>     </body> </report>
} 

}

Hi! Thanks for all your work on the VS Code side of IRIS!

Today, I wanted to give the new Server-side Editing feature a try, but I cannot get the button “Choose Server and Namespace” to appear in VS Code Explorer. The "intersystems.servers" in settings.json are configured properly. The button does not appear whether or not I add or leave out username and password properties.

Any thoughts on this?

Next Steps
I have developed a small ZEN app as a test bed that models a pattern that I widely use in the current ZEN app
This together with the extended ObjectDataModel class will be available shortly on GIT Hub

I then plan to reproduce the same functionality in Angular2 / Rest Calls / JSON to and from the extended ObjectDataModel

Hi Peter,

thanks for your series on "Replacing ZEN". I wonder where you are in your journey - did you manage to put your test app on GitHub, yet?

Thanks

malte.