Page 1 of 3 123 LastLast
Results 1 to 13 of 28
  1. #1
    Join Date
    Jul 2009
    Location
    Charlotte, NC
    Posts
    419

    Help with exporting trends in AX.

    It's been several years since I dealt with trends, so I'm in need of some refreshers.

    I have several history charts I want to export to pdf for a client. The data goes back to around November of last year. In doing this, I noticed that no matter what time frame I select (today, last 24 hrs, month to date, etc.), it only exports a chart for today's data. Is there any way to get around this? I don't recall ever having this problem in the past, but then again, my memory isn't the sharpest.

    Any help would be greatly appreciated!

  2. #2
    File-Open Query, in "in" box, choose the trend you want to see.

  3. #3
    Join Date
    Jul 2009
    Location
    Charlotte, NC
    Posts
    419
    When I do that, it shows it as a table. I'm wanting to export the chart, but include time-frames other than "Today". I can export to .PDF tables in other time frames, but when I export the chart , it only exports it with Today's data.

  4. #4
    I don't have this issue on my systems. Sorry, can't help.

  5. #5
    Join Date
    Apr 2007
    Location
    San Diego, CA
    Posts
    1,302
    Quote Originally Posted by ControlY0urMind View Post
    It's been several years since I dealt with trends, so I'm in need of some refreshers.

    I noticed that no matter what time frame I select (today, last 24 hrs, month to date, etc.), it only exports a chart for today's data.
    Call support and ask for an updated chart.jar
    http://www.niagara-central.com/ord?p...manIssue/15797

  6. #6
    Join Date
    Jul 2008
    Posts
    1,413
    Open the Report Pallette.
    Drag ReportService to Services.
    Drag an ExportSource to a wiresheet
    Configure the ExportSource/Source to be your BQL query and set the Exporter as TableToText or TableToCsv
    Drag a FileRecipient or EmailRecipient to wiresheet
    Connect ExportSource/Out to EmailRecipient/Route


    etc
    etc
    1 + 1 = 3 ( *** for very large values of 1)

    ...everybody wants a box of chocolates and long stemmed rose

  7. #7
    Join Date
    Oct 2007
    Location
    Huntsville, AL
    Posts
    385
    Is there any way to export all trend to .csv all at once instead of going through one trend at a time and exporting?

  8. #8
    I had to write a custom exporter in order to do this. Wasn't easy but it can be done.

  9. #9
    Join Date
    Jul 2008
    Posts
    1,413
    I havent done it but I assume you can write the BQL so that it gathers all the points youre interested in and writes them to csv.

    Meh, I'll test it and see.
    1 + 1 = 3 ( *** for very large values of 1)

    ...everybody wants a box of chocolates and long stemmed rose

  10. #10
    Join Date
    Jul 2008
    Posts
    1,413
    Well... I cant get BQL to deliver a grid with multiple columns corresponding to histories....but I can get a chart with multiple histories....so the table exists somewhere at least

    ...there must be a way!

    ...program service maybe

    Tshort ... how did you guys achieve it?
    1 + 1 = 3 ( *** for very large values of 1)

    ...everybody wants a box of chocolates and long stemmed rose

  11. #11
    We have created a custom module which houses several components, etc...

    In order for us to accomplish the mass exporting of trends I created a new class file that extends BExporter.

    The first thing you need to do is create an instance of BHistorySpace, here's how I did it:

    BHistorySpace space = (BHistorySpace)BOrd.make("history:").resolve(holde r).get();

    Note holder is a variable that I am passing through a method. In order to resolve an ord you need to resolve it to something, you could use any component that you have instantiated.

    Next I created an array of BHistoryDevice, like this:

    BHistoryDevice[] devs=space.listDevices();

    Now comes the tricky part, we only have one BHistoryDevice in our stations due to the application so it's easier for us. However keep in mind you may have more, just depends on how you're doing this.

    Next we ensure there our array of BHistoryDevice is > 0 and start getting the Histories.

    if (devs.length>0) {
    BHistoryDevice hdev = devs[0];
    BINavNode[] nodes = hdev.getNavChildren();
    BHistory[] his = new BHistory[nodes.length];
    if (nodes.length>0) {
    for (int i=0;i<nodes.length;i++) {
    his[i]=(BHistory)BOrd.make(nodes[i].getNavOrd().relativizeToSession().toString()).res olve(holder).get();
    }
    }

    As you can see it can be somewhat involved. If you want send me an email as it may be easier to explain that way. Not sure your level of expertise with java, took me a few years to get to where I am now.

  12. #12
    Join Date
    Jul 2008
    Posts
    1,413
    Hmm, I figured it would be something along those lines.

    I guess the real issue is understanding the whole Tridium API and working out which bit to 'extend'.
    ...my Java is such that I can understand it when spoken to me.
    ...but I have trouble speaking it myself.

    Another way to do this might be to craft an Excel Document with relevant webQueries... a little vba and voila. Or maybe, stuff the data into MSDE database...then use excel

    What a mess...why cant Tridium export tabulated data for Histories ???
    1 + 1 = 3 ( *** for very large values of 1)

    ...everybody wants a box of chocolates and long stemmed rose

  13. #13
    You can export tabulated history data. The problem I ran into is that I was having to do this on an individual collection table basis. When you have a 100+ trends this is a rather large task. Just right click on views and goto Collection Table. You can export the whole collection to a .csv this way. It's just on an individual basis.

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Comfortech Show Promo Image

Related Forums

Plumbing Talks | Contractor Magazine
Forums | Electrical Construction & Maintenance (EC&M) Magazine
Comfortech365 Virtual Event