[Resolved]Erro in report

Stimulsoft Reports.WEB discussion
Post Reply
Leandro
Posts: 74
Joined: Tue Aug 08, 2006 9:07 am
Location: Brasil

[Resolved]Erro in report

Post by Leandro »

c:\Documents and Settings\user\Configurações locais\Temp\faz3ra54.0.cs(37,53) : error CS0102: Tipo 'Reports.Report' já contém uma definição para 'Telefone'c:\Documents and Settings\user\Configurações locais\Temp\faz3ra54.0.cs(107,21) : error CS0111: Tipo 'Reports.Report' já define um membro denominado 'Telefone__GetValue' com os mesmos tipos de parâmetro

What this generating this error?
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

[Resolved]Erro in report

Post by Jan »

Hello,

Something wrong with compilation of your report. Some names is duplicated. I can't say more without report file.

Thank you.
Leandro
Posts: 74
Joined: Tue Aug 08, 2006 9:07 am
Location: Brasil

[Resolved]Erro in report

Post by Leandro »

The report is created in time of execution.
I have a code that makes a loop in the fields filed in a table inserting in report.
The field telephones only added once...

Code: Select all

double inicio = 0;
foreach (Tester.UserCampo item in campos){
  StiText headerText = new StiText(new RectangleD(inicio, 0, Convert.ToDouble(item.WidthCampo) / 32, 0.3));
  headerText.Text = item.DescricaoCampo;
  headerText.Name = item.DescricaoCampo;
  headerText.TextBrush = new StiSolidBrush(Color.FromArgb(21, 66, 139));
  headerBand.Components.Add(headerText);

  StiText dataText = new StiText(new RectangleD(inicio, 0, Convert.ToDouble(item.WidthCampo) / 32, 0.3));
  dataText.Text = "{" + table.ToUpper() + "." + item.IdCampo + "}";
  dataText.Name = item.IdCampo;

  if (item.DataType == "datetime"){
      dataText.TextFormat = new Stimulsoft.Report.Components.TextFormats.StiDateFormatService("dd/MM/yyyy", " ");
  }
  dataBand.Components.Add(dataText);
   inicio = (Convert.ToDouble(item.WidthCampo) / 32) + inicio;
}
What can be happening?
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

[Resolved]Erro in report

Post by Jan »

Hello,

Save created report to file. After then open saved report with help of report designer. Click on preview. You will receive errors in message panel. Double click on it. You will point on element in report code which produce this problem.

Thank you.
Leandro
Posts: 74
Joined: Tue Aug 08, 2006 9:07 am
Location: Brasil

[Resolved]Erro in report

Post by Leandro »

Thank you, I executed.

Code: Select all

report.Save ("C:\\teste.mrt ");   
Analyzing the generated file verified that in some fields so much the headerText as the dataText was with the same name
Post Reply