Report Builder Preview and Actual not matching up

So I am trying to use the Bar Chart. I have used it many times before but for some reason I am struggling. It works perfectly in the preview, I go to the actual perspective report viewer and it isn't even close to being correctly rendered.

I thought it could be the data coming from the query I am running, but it isn't the preview will run the query and return the data and show it in the chart just fine. I even made a sample array by hand and it works in the preview, but that same sample just doesn't work in the client...

Preview:

Client:

Each member of the array I am feeding it looks like this :

{
"name":fAsset["name"],
"Chlorine":0,
"Nitrogen":0
}

I have the bar chart configured to use row extract order render as bars. No scripting enabled.

I am really scratching my head on this one. I even tried removing the graph and remaking it. I am sure I am missing something.

Reporting wants to work off "real" datasets, not JSON arrays-of-objects that Perspective likes to use. Are you bringing the data in to the report viewer component in Perspective via a query binding, and have you tried changing the return format to dataset?

2 Likes

Duh...Late night trial and error leads you down bad paths lol.

Thanks for the reminder. Dataset was the answer. I should probably not be sucked into report builder after midnight.

1 Like

Tip: if you have to move a query binding to capture the dataset for this sort of thing, you can replace the original binding with this one-liner if you have my Toolkit installed:

forEach({path.to.dataset}, asMap(it()))

Though I like to show the structure with whitespace, like so:

forEach(
	{path.to.dataset},
	asMap(it()))
)
2 Likes