Copy graphs from perspective to report pages

If I have a stacked bargraph on a Perspective page, is there an easy way to copy it to the Reports pages?

Or do I need to reconstruct it?

Don't believe you have an easy button on this one.

1 Like

Thanks


I have a query that takes a machine parameter.

Do I need to make 10 datakeys and 10 components on the report to show the graphs of all 10 machines?


I want to experiment with making a report that will email me monthly the OEE graphs of 10 machines.

I want to do it efficiently, but I am worried I will need to make 10 graphs in design and 10 datakeys in data.
If I must do that, it is okay, but if I can do it simpler, I want to learn that.

I can see I can set the parameter to a path to a parameter I make in my report.
I don't see yet how to leverage multiple tables from one query though in the report.

Look into parent/child queries...

1 Like

This is kind of a bugger.

On the perspective page, I used a query, then a script transform to get the data to work how I needed it for my chart.

Where do you put in a script to transform your data source?


Thanks Matrix, I will look at parent/child queries in the manual .

Did you forget this already?
Help inserting rows of totals to a dataset from a query - Ignition - Inductive Automation Forum

1 Like

You pair a SQL Query Data source with a Scripting data source: Scripting Data Source - Ignition User Manual 8.1 - Ignition Documentation

This is only in the reporting module.

1 Like

Thanks so much.

Yes, I forgot.
I need to review these things. I don't use the Reporting module much. Sorry, and thanks again.

It happens, no problem :slight_smile:
A lot of times, I like to put data like this in a report to begin with and just use the report viewer with dynamic parameters to interact with the report. Especially since a perspective view can't be printed. Although, I think they are working on that.

1 Like

Since technically perspective charts are SVGs, I wonder if they could add a function to them to get the SVG contents. You could then save it somewhere and show it in the report dynamically based off that location.

2 Likes

I was thinking about this more

It could potentially be done by formulating a web dev URL to request a perspective page that includes the graph with an associated domId, and then having that web dev script pull the SVG out of the Dom and returning it. Then using the Image component on a report and setting the url to the web dev endpoint

Hacky as heck but technically should be possible.

1 Like

I am surprised there isn't a component in reporting that lets you import some json from Perspective.

I don't know enough about the two though to understand the difficulties that might have.

Post your requests here, https://ideas.inductiveautomation.com/

1 Like

I am having a ton of issues with the reporting XY Chart and Bar Chart.

I initiated a ticket. The auto range is toggling on and off without my changing it.
The dates aren't showing up on the X axis correctly.
I keep trying to put MM-dd in the date format.
I am in 8.1.0, and have tried so many configurations
I thought I might post in case someone can help, but probably I need to wait for the support ticket.

Here I show my table is reading the date.


@jlandwerlen
I don't have a request. A json component was like a passing thought. For all I know, that would be ridiculously complicated to implement and used by nobody.

You can post your passing thoughts there too. :slight_smile:

2 Likes

The more I think about it though, it would be like asking someone to make a new web browser inside of the reporting module.

Worse, it is because I can't figure out how to make the reporting charts work haha.

UPDATE
I am working on this still, but I have partial solutions to the below items that I had created earlier on 2022-10-14
When a graph is too thin, dots appear instead of the string at the bottom.
I modified my query, I scale x and y now after I set the size very large to get the text to show.
I am also writing a datasource for each graph so that I can place them how I want to.
I didn't do the nested query, or at least not yet.


I made a new query, this time instead of format(dateadd(), ), I used cast( dateadd( ) ) so my first column is a timestamp. It is working with the timeseries chart.

I am not having a page size issue I think.
For reference:

US Paper Size 72 PPI (Width x Height) 96 PPI (Width x Height)
ANSI A 612 x 791 pixels 816 x 1054 pixels
ANSI B 791 x 1225 pixels 1054 x 1633 pixels
ANSI C 1225 x 1585 pixels 1633 x 2113 pixels
ANSI D 1585 x 2449 pixels 2113 x 3266 pixels

I want to make a report that gets emailed with these charts.
On my screen, in Perspective, I set for a chart 1800px wide.
How do I relate pixels of my 1080 screen to a page size?

Right now, I set for Tabloid.


I don't see how to get the bars to stack in the time series chart.

image


I got a bar chart to stack, but the dates don't show.
Also, it is showing the data in a different order, with the wrong header to the data.
-I think it is ordering by ascii so I need to change the column headers.

image

It has been a long time for me.

Had to set return size to 0 to get the values.

dataSet = system.tag.queryTagHistory(paths=['path'],
startDate=startTime, endDate=endTime, returnsize=0, intervalHours=24,
)

I am trying to track some historized data for about 12 production lines.

I think what I am going to do is write two queries, one in a script.
I will get my particular path information in my parent query.
Then I will pass that to my second query, however I am not sure how make sure I am querying the most recent partition of the historian.


Based on this example:

Nested Queries | Ignition User Manual]


Except I am struggling to figure out how to set the parameter from a parent query to a historian query.

I basically have two examples incomplete for my one application.
The video shows pushing a parameter into the historian query from the report viewer.
The nested query example shows two queries working together.

What I need is an example of designating the parameter value on the chart I place in the report for the historian query indirect address.

I have {line} in the path of the path for the historized tags. I just don't know how to get the chart let me set that parameter inside the report.