I have to agree on this one as well. Especially since you can have tasks kick off once a given task has finished. 

It really depends on what the acceptance criteria is, in my opinion. You don't have to name it to an excel extension, a .csv will open just fine in excel although you do lose some formatting abilities. 

One of the things we recently implemented is just having a simple node server that accepts a JSON call via REST using the exceljs node library. Granted this is outside of cache but it does the job.

Depending on your memory settings calling out your reporting result to another service can hit a max string issue unless it takes a pure stream.

There is another post out here that tried to achieve this problem by actually creating html tables in excel (This may be what Charles was talking about but his link breaks for me so I just get a 404), but once again if it's the same approach I am thinking of you hit formatting issues.

One approach I am currently investigating is using an ADO .net connection to pull the data from the cache database and presenting it to the front end using an excel nugget package. 

Hope this information helps and good luck, please let us know what you ended up with!

- Chris

Edward,

This may be a silly question but the Business Service in your Ensemble Production is currently enabled, correct?

Yes, you are seeing that because it sounds like you are loading the object and then doing a zw on the object. 

You can create your class and then change the storage definition in your class to use the ^Person global. I suggest you get a good idea of how the storage definitions work before you start messing around with it though. 

SQL tables are just projections (this is an over simplification) of the globals. 

So your table User.Person is storing all of the data in ^User.PersonD. If you have indices, they are stored in ^User.PersonI.

if you compile that class, and in terminal run zw ^User.PersonD you'd see the structure of the global.

Class User.Person Extends %Persistent {

Property Name as %String;

Property Gender as %String;

Property JobTitle as %String;

}

set Person = ##class(User.Person).%New()

set Person.Name = "Mike"

set Person.Gender = "Male"

set Person.JobTitle = "Developer"

set status = Person.%Save()

This creates a new record in the Person table, but it's also in the User.PersonD global. Assuming this is the first record, you'll have an %Id() of 1

if you wanted to get the Person

set Person = ##class(User.Person).%OpenId(1)

if you wanted to delete:

set status = ##class(User.Person).%DeleteId(1)

Hope that helps.

P.S. - I wrote this in only a couple of minutes so there may be errors. Intersystems documentation can tell you more and I think there are examples in the Samples namespace.

You implement DSTIME on a class by doing the following in your persistent class:

Parameter DSTIME As STRING [ Constraint = ",AUTO,MANUAL", Flags = ENUM ] = "AUTO";
 

You will need to implement batching as well so you only pick up changes to a class from the last time you queried against DSTIME. I believe there are a few posts in the community that further discuss implementing DSTIME. 

Best of luck. 

Steve,

Thank you for clearing up some things I left out. I actually learned a little which I greatly appreciate! I would like to take this time to somewhat hijack the thread (sorry) but when it comes to using the Ensemble scheduler don't you need to consider how often you are scheduling a task? The quicker you need it to occur doesn't CallInterval become more beneficial? We have quite a few Ensemble services that need to kick off (~30 seconds) and we have had this debate for some time when we need to invoke the Ensemble scheduler. 

Thanks!

- Chris

You would override the OnInit method in your business service, it's what is called when a business host starts up when a production comes up (assuming it was enabled when the production went down)

You can even set a call interval so that it does that X amount of seconds / minutes / hours. 

Also, Ens.Director is not a business host class that you can use, it's a class that allows you to control various features of a production as well as monitor its state.

I would recommend the DSTIME approach as well. We use this for syncing up information from our cache ERP to our BI tool. DeepSea is actually using DSTIME to show changes as well. 

With using DSTIME you are allowed to write code and determine what DSTime batches you want to synchronize with, allowing you to fully control how often you want to sync up data.