Using Ignition 8.1.17,Reporting 6.1.17
The reporting system is surprisingly powerful and flexible, but I am having trouble with a particular issue.
For certain alarms, a report needs to be generated with details of each alarmJournal instance in the given time window. The details consist of a timeseries chart, or charts, of alarm-specific analog and digital historic tag data, from a period of minutes before the alarm, from a pre-defined diagnostics list.
We can limit the number of analog and digital pens because this is a report, and too many data points will make it unreadable. Target is 0-6 Analog, 0-6 Digital per chart. Getting the data was simple enough, but getting the data into the report has been my challange.
I started with 2 analog signals. The dataset for that contains 4 columns [Fault_Time, t_stamp, Analog01, Analog02]. I made a table with the dataset as the datakey, and grouped by Fault_Time. I made the Fault_Time detail unstructured and inserted a timeseries chart. I set the chart pens to the two analog columns and everything worked just fine.
Except, what if I want digital? I fgured I could put the actual name of the tag as the columnName, and append "_alg" or "_dig", which could be used to differentiate the tags for a script to create dynamic pens and point at the correct column. The report needs to automate the changing of chart scaling and pen count and pen source for each different alarm.
I have been trying to dynamically create pens, but I have only been able to create a headache, reading org.jfreechart and trying figure out which objects contain which others and I swear half of them are named 'Legend'
Am I going about it a wrong? Perhaps there is a friendlier way to accomplish what I'm trying to do? I'm open to suggestions!
As an bonus question, can anyone tell me what a '$' signifies in a <type>? I came accross com.inductiveautomation.rm.shape.j2dshapes.AbstractXYChart$RpgXYDataset
. There is a doc on the AbstractXYChart, but nothing about RpgXYDataset. Running a dir() told me that wasn't an AbstractXYChart.