ActiveReports Developers 7 Now Available in Beta!! (click for details)

ActiveReports 6 Support

Started by Marketware at 03-08-2010 9:30 AM. Topic has 3 replies.

Print Search Rate
Sort Posts:    
   03-08-2010, 9:30 AM
Marketware is not online. Last active: 4/21/2012 3:27:03 AM Marketware

Top 150 Posts
Joined on 02-14-2009
Posts 73
Error Printing Report
I have a report that sets the rpt.DataSource to a new table in the script. The first time that the report runs it works just fine, but the second time I attempt to preview the report (while running from the designer) I get the following error:

We already have a component named name

(name is the field name of one of the fields in the table).

The code is as follows:

rpt.DataSource = oQuery.TableResult;


If I close the report and run it again, no problems, its only after the Bound fields are initially set that this error occurs.

What do I need to do to correct? Thanks!!

   Report 
   03-08-2010, 11:22 PM
AnkitN is not online. Last active: 6/8/2010 6:43:55 AM AnkitN

Top 25 Posts
Joined on 03-03-2009
Posts 844

DDStaff
Re: Error Printing Report
Hello,

Are you setting the DataFields at runtime or design time? Could you please provide me the RPX file of your reports and the steps to reproduce the issue?

Regards,
Ankit Nigam


   Report 
   03-19-2010, 10:57 AM
Marketware is not online. Last active: 4/21/2012 3:27:03 AM Marketware

Top 150 Posts
Joined on 02-14-2009
Posts 73
Re: Error Printing Report
Sorry, I've been on vacation for the last couple of weeks and haven't gotten back to reply to your question.

The error only occurs when I try to reset the DataSource in the designer after it has once been set. I can save the report, and then reopen the report and run it and all is well, but if I attempt to set the DataSource more than once while the report is still open in the designer the error occurs. Here is the code in that causes the error:

Report_Data = (DataTable)query.TableResult;

this.Fields.Clear(); // I tried this, but it didn't make difference.

this.DataSource = Report_Data;

Our implementation of the report designer is really too complex to send you the code. I could send you the report file, but it is happening with many of our reports.
   Report 
   03-21-2010, 11:52 PM
SankalpS is not online. Last active: 3/30/2012 11:17:34 PM SankalpS

Top 10 Posts
Joined on 12-11-2008
Posts 2,587

DDStaff
Re: Error Printing Report

Attachment: Test.rpx
Marketware,

Are you saying that you are setting the datasource both at the design time and using script? Unfortunately I am not able to replicate the issue which you are facing. I have attached a simple RPX file in which script has been used to set the datasource for the report and a datatable has been used as a datasource.

Kindly load the RPX file and try to modify it at your end. If you are able to replicate the issue then please send it back to us, so that we may try to figure out what could be cause of the issue. Any further information provided to narrow down the issue would be appreciated.

Regards,
Sankalp
Sankalp Sen
GrapeCity- DataDynamics
   Report 
GrapeCity » Product Support » ActiveReports 6... » Error Printing Report

Privacy Policy | Copyright © 1997-2012 — GrapeCity, inc.
All trademarks mentioned are the property of their respective owners.