Any help or suggestion highly appreciated as I am stuck on something that should be simple to fix.
My application in summary has a person with properties (Name, Age, height, etc...). Also arrays of ushort or double that represent pressure waveforms. I wish to put this data onto a report for printing to PDFs.
I can successfully create a custom assembly and load it in the standalone ReportDesiger and it successfully fetches the data for the report for a single person. I can put the properties for the Name, Age, Height etc. on the report.
What I have not been able to do is present the array data in a form that can be consumed successfully by the report Graph.
Can someone please point me to an existing sample or suggestions on what classes I should copy the graph data into for it to then be usable in the Report Graph. I was expecting to use a scatter line graph as the Y axis doubles representing values in the range 0 to 300. The x axis is time. Some graphs are short duration (0.3 seconds), some are longer at around 10 seconds (2048 sample points).
A simplified model for testing purposes though might be as follows. You can see I have tried two different ways to represent the X & Y coordinates on the graph. In the final solution would only need one way, whatever that may be that makes report Graph work.
public class ReportModel
{
public string Fullname { get; set; }
public double[] X { get; set; }
public double[] Y { get; set; }
public List<Point> GraphPoints { get; set; }
public ReportModel()
{
Fullname = "John Doe";
X = new double[] { 1, 2, 3, 4, 5, 6, 7 };
Y = new double[] { 2, 4, 6, 8, 10, 12, 14 };
GraphPoints = new List<Point>();
for(int i = 0; i<X.Length; i++)
{
Point p = new Point();
p.X = X[i];
p.Y = Y[i]; }
}
}
public class Point
{
double x;
double y;
public double X
{
get
{
return x;
}
set
{
x = value;
}
}
public double Y
{
get
{
return y;
}
set
{
y = value;
}
}
}