To modify Characteristics of the Graphs.
Hello.
We are testing the Fast Report to check if it is useful for us.
Visual BAsic Code
I need to generate graphs by code, but there are many properties that do not can modified.
The size of the graph (Width,Height), the format of data (formatValue).
It is necessary to create an object in particular within the TfrxChartView.
From the FastReport is can to modify properties, but by code i do not know to do it.
CODE:
Dim Grafica As IfrxChartView
Set Grafica = report.CreateReportObjectEx(page, "TfrxChartView", "Char_View1")
Set database = report.CreateReportObjectEx(page, "TfrxADODatabase", "Database")
Set sql_query = report.CreateReportObjectEx(page, "TfrxADOQuery", "SQL_Query1")
report.SelectDataset True, sql_query
Grafica.GetSeriesItem(Grafica.SeriesCount - 1).XAxisType = xtNumber
Grafica.GetSeriesItem(Grafica.SeriesCount - 1).DataSet = sql_query
Grafica.GetSeriesItem(Grafica.SeriesCount - 1).Title = "Grafica"
Grafica.GetSeriesItem(Grafica.SeriesCount - 1).DataSet.ValueOfField ("TITULAR")
Grafica.GetSeriesItem(Grafica.SeriesCount - 1).XSource = "sql_query1.""TITULAR"""
Grafica.GetSeriesItem(Grafica.SeriesCount - 1).YSource = "sql_query1.""Importe"""
Thanks
We are testing the Fast Report to check if it is useful for us.
Visual BAsic Code
I need to generate graphs by code, but there are many properties that do not can modified.
The size of the graph (Width,Height), the format of data (formatValue).
It is necessary to create an object in particular within the TfrxChartView.
From the FastReport is can to modify properties, but by code i do not know to do it.
CODE:
Dim Grafica As IfrxChartView
Set Grafica = report.CreateReportObjectEx(page, "TfrxChartView", "Char_View1")
Set database = report.CreateReportObjectEx(page, "TfrxADODatabase", "Database")
Set sql_query = report.CreateReportObjectEx(page, "TfrxADOQuery", "SQL_Query1")
report.SelectDataset True, sql_query
Grafica.GetSeriesItem(Grafica.SeriesCount - 1).XAxisType = xtNumber
Grafica.GetSeriesItem(Grafica.SeriesCount - 1).DataSet = sql_query
Grafica.GetSeriesItem(Grafica.SeriesCount - 1).Title = "Grafica"
Grafica.GetSeriesItem(Grafica.SeriesCount - 1).DataSet.ValueOfField ("TITULAR")
Grafica.GetSeriesItem(Grafica.SeriesCount - 1).XSource = "sql_query1.""TITULAR"""
Grafica.GetSeriesItem(Grafica.SeriesCount - 1).YSource = "sql_query1.""Importe"""
Thanks
Comments
Actually, TfrxChartView built on top of TeeChart library that provides huge amout of different properties. We export some of then into IfrxChartView and accompanying interfaces.
To set the size of graph you can cast IfrxChartView to IfrxComponent and set Width and Height properties.
Unfortunately, there is no way to set the formatValue at this time. We consider to add such feature after release of FR Studio 4.