See if the formatting of your color is correct:
First and foremost check whether the value accepted by the color should be in the format hexadecimal
, TAlphaColor
or RGB
.
You can do this by saving the file with this property, opening the file generated with final fr3
and parsing the text after the <Color>
tag, then you can see the expected color format.
In addition I see 2 ways you can resolve this:
1st Way
- Make all the static changes you want and save the view as a
FR3
file.
- In Form you want to use the report put a
TfrxReport
component blank.
- When you enable the view of this report use
NomeDoReport.LoadFromFile(Caminho + NomeDoReport.fr3);
- Show View with
NomeDoReport.Show;
2nd Way
- Leave the Report already prepared or load it as in the 3rd step of the 1st way
- Declare a
TfrxMemoView
variable in your Form code
- Assign the properties of the desired object to this variable through the code:
NomeDoMeuMemoView := NomeDoReport.FindObject('NomeDoObjetoDesejado') as TfrxMemoView;
- Access the desired properties using
NomeDoMeuView.NomeDaPropriedade := 'ValorNovo';
- When you change everything you want Prepare the Report% with%
- Display the report prepared in runtime with
NomeDoReport.PrepareReport;
Example of the 1st Way:
[...] //cabeçalho do Delphi e outras variáveis
ExemploReport: TfrxReport;
[...] //implementation, outras procedures e functions
procedure TfmxForm1.MostraReportCarregado;
begin
ExemploReport.LoadFromFile(Caminho + 'ExemploReport.fr3');
ExemploReport.Show;
end;
Example 2:
[...] //cabeçalho do Delphi e outras variáveis
ExemploReport: TfrxReport;
ObjetoExemploReport: TfrxMemoView;
[...] //implementation, outras procedures e functions
procedure TfmxForm1.MudaCabeçalhoReport;
begin
ExemploReport.PrepareReport(True); //aqui estou preparando o report para edição
RadiusReport.LoadFromFile(Caminho + 'ExemploReport.fr3');
ObjetoExemploReport := ExemploReport.FindObject('NomeDoObjeto') as TfrxMemoView;
ObjetoExemploReport.Text := 'Texto Mudado';
ExemploReport.PrepareReport;
ExemploReport.ShowPreparedReport;
end;
Considerations
The first way is easier to implement on your system, but is tied to static values, a great alternative if you want to avoid errors and want a quick implementation, but the 2nd way changes the properties in runtime, ie, opens space for customization possibilities by the system user.