This is a migrated thread and some comments may be shown as answers.

error when saving in PDF format

2 Answers 79 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Matheus
Top achievements
Rank 1
Matheus asked on 28 Jul 2015, 08:05 PM

Error saving the file in pdf format within the .pdf file with the message:

 An error has occurred while processing Report 'Report1':
Object with name 'Report2' already exists. Object should have unique names.

Can someone help me?

2 Answers, 1 is accepted

Sort by
0
Accepted
Nasko
Telerik team
answered on 29 Jul 2015, 08:58 AM
Hello string,

The provided error message states there is an issue in the report definition with duplicate object names. We will need to review the problematic report definition in order to pinpoint the culprit and provide any suggestions.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Matheus
Top achievements
Rank 1
answered on 29 Jul 2015, 12:32 PM

This and my code for loading the subreport, the file in the viewer and generated perfectly but when saving in PDF format and you receive the error message that was mentioned. 

 

01.#region Cliente / AnĂ¡lise
02.                   if (dataTableQuantidadeClientes.Rows.Count > 0)
03.                   {
04.                       //Subreport
05.                       Telerik.Reporting.SubReport subReport = null;
06.                       Cliente subReportCliente = null;
07. 
08.                       for (int x = 0; x < dataTableQuantidadeClientes.Rows.Count; x++)
09.                       {
10.                           subReportCliente = new Cliente(DataInicial, DataFinal, dataTableQuantidadeClientes.Rows[x]["Cliente"].ToString());
11.                           subReport = new SubReport();
12.                           subReport.ReportSource = subReportCliente;
13.                           subReport.Size = new SizeU(new Unit(19, Telerik.Reporting.Drawing.UnitType.Cm), new Unit(8.8, Telerik.Reporting.Drawing.UnitType.Cm));
14.                           subReport.Dock = DockStyle.Top;
15.                           subReport.KeepTogether = true;
16.                           subReport.Name = string.Format("subReport_Cliente_{0}", (x + 1));
17.                           this.panelClienteAnalise.Items.Add(subReport);
18.                       }
19.                   }
20. 
21.#endregion Cliente / AnĂ¡lise 


Tags
General Discussions
Asked by
Matheus
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Matheus
Top achievements
Rank 1
Share this question
or