Download a Table of data


ethushara
 Share

Recommended Posts

Hi,

I need to get some data arranged in a page in daqconnect to a PDF file and download when a button pressed in daqconnect page. Please let me know the possibility. This is like a report to be downloaded after monitoring in the daqconnect page. No need to get trends. Just some static values of tags or virtual channels to a nicely arranged format. 

 

Thanks

Link to comment
Share on other sites

Hi,

Thanks for the reply.

1. To download the CSV file also we have to access the dashboard. But is there any other way to do it through a button press in the page? 

2. When we download few tags, those are downloaded with separate csv file for each tag. Can we get all in one csv file in separate columns? 

3. Can we select the required tags to be downloaded and download through a button press in the the page to get the selected tags in separate columns in same csv?

 

Thanks,

Link to comment
Share on other sites

Hi,

4. If we cannot make custom reports and download in pdf in daqconnect, is there any other way to make them using another web based application or any other by taking the uploaded data from daqconnect?

Can you help me on this as this is much required for me. even at another cost. 

 

Thanks

Link to comment
Share on other sites

#1 - #3:

While you can still do it from the dashboard, the better way to do it is using the DownloadData() function.  The docs for that are below.  

#4: DAQConnect supports the ability to replicate your data to a MySQL database that is externally accessible.  You could then use pretty much any web based reporting tool available to generate reports, or do data mining.  The MySQL feature requires an OEM server and so we would have to migrate your account over to an OEM.  Please email us directly to discuss.

Data download docs:

 

$.dc.dataSource.downloadData(data source name, options)

Options can be a whole bunch of stuff, but if you leave it empty and
just do, for example:

$.dc.dataSource.downloadData("DataSourceName")

it will prompt the user for many of the items, including which tags to
download.

Options is a javascript object, with these defaults:

{
            filename : dataSourceName + "_data.csv",
            columns : [],
            tags : [],
            tagsToDisplay : null,
            start : $.dc.member.getCurrentServerTime() - 86400000,
            end : $.dc.member.getCurrentServerTime(),
            format : "csv",
            interval : 60000,
            ignoreEmpty : true,
            promptMember : true,

            tzOffset : 0
};

Probably a little confusing.  First an example, let's say you want to
display a different default file name and interval:

$.dc.dataSource.downloadData("Belleville", {filename : "myfile.csv",
interval : 120000})

Here's a description:

filename: the default file name displayed, or the actual final file
name if promptMember is false

columns: an array specifying exactly what to download.  Should only be
used if promptMember is false.  Takes an array of objects in the form:
{tag : "xxx", label : "yyy"}.  Use this when you want to create a
button that downloads the same set of tags every time and you don't
want to ask the user.  Using this is a nice replacement for a dataset

tags: an array of string specifying the tags to download. This is just
a slimmer version of columns.  Use one or the other.  Using columns
gives you control over labels.  This uses the tag name as the label.

tagsToDisplay: an array of strings listing (case sensitive) the tags
you'd like the user to see when the popup arrives.  Leave null to list
all tags in the data source

start/end: the start and end of the time range to download, in ms.
Defaults to the last day.

format: presently always "csv"

interval: the spacing of the data, in milliseconds. Defaults to 60 seconds.

ignoreEmpty: if true, then a row is only created if there is data in
one of the columns.  If false, then a row is created at every interval
between start and end

promptMember: if true, then a popup asking for the tags, range,
interval, etc is displayed.  Otherwise it uses the above settings.
Make sure tags or columns is specified if this is false.  Make sure
they aren't specified if true.

 

tzOffset : time zone offset in hours from UTC.  Can be fractional hours.  Affects start/end time as well.

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share