| |
ActiveReports 6 Support
Started by tomperren at 02-25-2010 3:40 AM. Topic has 26 replies.
 
 
 
|
|
Sort Posts:
|
|
|
|
02-25-2010, 3:40 AM
|
tomperren
Joined on 01-08-2010
Posts 12
|
AR6 throwing exception during save...
|
|
|
|
|
Hi,
I've just upgraded to AR6 and have an issue when saving certain reports from our report designer to the database within our application.
Exception: Object reference not set to an instance of an object.
Source: ActiveReports6
Stack Trace:
at DataDynamics.ActiveReports.ControlCollection.WriteXml(XmlElement sectionNode)
at DataDynamics.ActiveReports.Section.WriteXml(XmlElement sectionNode)
at DataDynamics.ActiveReports.SectionCollection.#ryb(XmlDocument layoutDoc)
at DataDynamics.ActiveReports.ActiveReport.#Lyb(XmlDocument layoutDoc)
at DataDynamics.ActiveReports.ActiveReport.SaveLayout(Stream stream, RpxFormat rpxFormat)
at DataDynamics.ActiveReports.ActiveReport.SaveLayout(Stream stream)
at Frameworks.BusinessObjects.ActiveReports.ReportHelper.SaveReportDesign(Designer design) in C:\dev\branches\Release 7.2.9\Frameworks.NET\BusinessObjects\ReportHelper.vb:line 22
at Frameworks.FieViews.ActiveReports.ReportDesigner.SaveReportDesign() in C:\dev\branches\Release 7.2.9\Frameworks.NET\FieViews\ReportDesigner.vb:line 300
at Frameworks.FieViews.ActiveReports.ReportDesigner.OnPreview(ActionDefinition sender, ActionDefinitionArgs e) in C:\dev\branches\Release 7.2.9\Frameworks.NET\FieViews\ReportDesigner.vb:line 571
As can be seen the AR control is throwing an exception. Unfortunately I have only got this error using reports that are specific to a customer of ours and I have yet to have permission to send the report through to you. I'm hoping that you are aware of the problem and can advise me of a fix to the report being saved or a release date for a patch? (As I say we have plenty of reports that save correctly - only those that I am not at liberty to send you fail(!)).
I'm using AR 6.0.2250.0 - which I believe is the latest release at the moment.
Regards,
Tom.
|
|
|
|
|
Report
|
|
|
|
02-26-2010, 4:35 AM
|
SankalpS
Joined on 12-11-2008
Posts 2,414

|
Re: AR6 throwing exception during save...
|
|
|
|
|
Tom,
Could you kindly provide me some more information about the exception which is coming on your reports? You have mentioned that most of the reports layouts save properly and the issue is with particular reports. Could you kindly let us know how exactly are you saving the layouts? Are you saving it directly to the file or via stream?
You have also mentioned that you will need to get the permission to send the reports to us. If you do not wish to send them on the public forum, then you may want to send them on our support E-mail address support@grapecity.us.com, so that we may try to figure out as to what the issue might be. In addition to this any additional information provided by you would be appreciated.
Regards, Sankalp
Sankalp Sen GrapeCity- DataDynamics
|
|
|
|
|
Report
|
|
|
|
02-26-2010, 4:56 AM
|
tomperren
Joined on 01-08-2010
Posts 12
|
Re: AR6 throwing exception during save...
|
|
|
|
|
Here's the code we use to save the report:
(design.Report is the ActiveReport control itself)
Dim stream As New System.IO.MemoryStream
design.Report.SaveLayout(stream)
Dim sr As New IO.StreamReader(stream, System.Text.Encoding.Unicode)
stream.Position = 0
Dim report As String = sr.ReadToEnd
sr.Close()
We then save the string to a database field for use later. The error occurs when we:
1. Open a report (from the database)
2. Display the report in the designer.
3. Save the report - at this point the exception is thrown.
|
|
|
|
|
Report
|
|
|
|
02-26-2010, 9:44 AM
|
AnkitN
Joined on 03-03-2009
Posts 844

|
Re: AR6 throwing exception during save...
|
|
|
|
|
Hello,
I have tested this issue with the reports built in the version 6.0.2250.0 but was not able to reproduce the error. Is there any difference between the reports of the affect client and the other clients? To test the issue I request to provide us the RPX files/reports files of your client.
Regards, Ankit Nigam
|
|
|
|
|
Report
|
|
|
|
03-12-2010, 7:55 AM
|
tomperren
Joined on 01-08-2010
Posts 12
|
Re: AR6 throwing exception during save...
|
|
|
|
|
Hi Ankit,
Here's the report that causes the fault previously discussed. The LoadLayout method successfully loads the XML - but when SaveLayout is subsequently called the following exception is thrown:
Exception: Object reference not set to an instance of an object.
Source: ActiveReports6
Stack Trace:
at DataDynamics.ActiveReports.ControlCollection.WriteXml(XmlElement sectionNode)
at DataDynamics.ActiveReports.Section.WriteXml(XmlElement sectionNode)
at DataDynamics.ActiveReports.SectionCollection.#ryb(XmlDocument layoutDoc)
at DataDynamics.ActiveReports.ActiveReport.#Lyb(XmlDocument layoutDoc)
at DataDynamics.ActiveReports.ActiveReport.SaveLayout(Stream stream, RpxFormat rpxFormat)
at DataDynamics.ActiveReports.ActiveReport.SaveLayout(Stream stream)
at Frameworks.BusinessObjects.ActiveReports.ReportHelper.SaveReportDesign(Designer design) in C:\dev\branches\CR805-7.2.9\Frameworks.NET\BusinessObjects\ReportHelper.vb:line 21
at Frameworks.FieViews.ActiveReports.ReportDesigner.SaveReportDesign() in C:\dev\branches\CR805-7.2.9\Frameworks.NET\FieViews\ReportDesigner.vb:line 300
at Frameworks.FieViews.ReportDesigner.ValidateControl() in C:\dev\branches\CR805-7.2.9\Frameworks.NET\FieViews\Reports.vb:line 270
at Frameworks.FieViews.FieViewContainer.ValidateControl() in C:\dev\branches\CR805-7.2.9\Frameworks.NET\FieViews\FieViewContainer.vb:line 346
at Frameworks.FieViews.ViewLayout.OnValidateViews(FieViewContainer sender) in C:\dev\branches\CR805-7.2.9\Frameworks.NET\FieViews\ViewLayout.vb:line 1102
at Frameworks.FieViews.ViewLayout.NeedSaving() in C:\dev\branches\CR805-7.2.9\Frameworks.NET\FieViews\ViewLayout.vb:line 773
at Frameworks.FieDesktop.MainForm.GetChangedLayouts() in C:\dev\branches\CR805-7.2.9\Frameworks.NET\FieDesktop\MainForm.vb:line 261
at Frameworks.FieDesktop.MainForm.SaveAnyChanges(Boolean promptToSave, Boolean allowIgnoreError) in C:\dev\branches\CR805-7.2.9\Frameworks.NET\FieDesktop\MainForm.vb:line 245
at Frameworks.FieDesktop.MainForm.OnValidToSelectNewNode(FieNode currentNode, FieNode newNode) in C:\dev\branches\CR805-7.2.9\Frameworks.NET\FieDesktop\MainForm.vb:line 107
at Frameworks.FieDesktop.NavigationMenu.tree_BeforeSelect(TreeControl sender, CancelNodeEventArgs e) in C:\dev\branches\CR805-7.2.9\Frameworks.NET\FieDesktop\NavigationMenu.vb:line 660
at Crownwood.DotNetMagic.Controls.TreeControl.OnBeforeSelect(Node n)
at Frameworks.Utils.TreeControl.OnBeforeSelect(Node n) in C:\dev\branches\CR805-7.2.9\Frameworks.NET\Utils\TreeControl.vb:line 283
at Crownwood.DotNetMagic.Controls.TreeControl.SingleSelect(Node n)
at Crownwood.DotNetMagic.Controls.TreeControl.set_SelectedNode(Node value)
at Frameworks.Utils.TreeControl.OnMouseUp(MouseEventArgs e) in C:\dev\branches\CR805-7.2.9\Frameworks.NET\Utils\TreeControl.vb:line 46
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at Crownwood.DotNetMagic.Controls.TreeControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Let me know if you can replicate.
Thanks,
Tom.
|
|
|
|
|
Report
|
|
|
|
03-12-2010, 7:59 AM
|
tomperren
Joined on 01-08-2010
Posts 12
|
Re: AR6 throwing exception during save...
|
|
|
|
|
Am unable to upload attachment - can you give me any clues as to why? (Tried renaming to extension .ext but still did not like it).
|
|
|
|
|
Report
|
|
|
|
03-12-2010, 12:41 PM
|
AashishB
Joined on 12-11-2008
Posts 818
|
Re: AR6 throwing exception during save...
|
|
|
|
|
tomperren,
try zipping the attachment. If that does not work, please upload here
Regards, Aashish
|
|
|
|
|
Report
|
|
|
|
03-15-2010, 3:54 PM
|
sims
Joined on 09-17-2004
Posts 17
|
Re: AR6 throwing exception during save...
|
|
|
|
|
I have the exact same problem. I uploaded a sample report using the link in the previous post (PersonnelSummary.rpx). It's a layout created in AR3. It has not been "upgraded" to AR6 because of problems in the upgrade tool (topic for another post) so we replace the string "ActiveReport3" to "ActiveReport" on the fly when calling LoadLayout.
|
|
|
|
|
Report
|
|
|
|
03-15-2010, 4:37 PM
|
sims
Joined on 09-17-2004
Posts 17
|
Re: AR6 throwing exception during save...
|
|
|
|
|
I uploaded a second report sample (PersonnelDetail.rpx) that is orders of magnitude more complicated than the first sample (PersonnelSummary.rpx). The more complicated detail report opens and saves without errors. The less complicated summary report opens but crashes when saved.
|
|
|
|
|
Report
|
|
|
|
03-15-2010, 5:22 PM
|
sims
Joined on 09-17-2004
Posts 17
|
Re: AR6 throwing exception during save...
|
|
|
|
|
I may have located the problem. It looks like a bug in how the report layout is loaded in AR6. In AR3, opening a file with this on the second line:
ActiveReportsLayout Version="4
... is automatically converted to:
ActiveReportsLayout Version="3.1" ...
Even though the version number decrements... the 3.1 is the more recent layout. Once a RPX layout is opened and saved in AR3, it can be loaded and saved in AR6. Since AR3 knows how to convert v4 to v3.1, AR6 should be able to perform the same conversion. That's why this should be classified as a bug.
How do we handle custom reports developed by our users in the old "4" version? Is there something in the AR library we can call to force this initial upgrade from "4" to "3.1"? Since we cannot have AR3 and AR6 in the same solution, we can't do this conversion in the background unless there's an undocumented method.
|
|
|
|
|
Report
|
|
|
|
03-16-2010, 4:33 AM
|
PrantikS
Joined on 12-11-2008
Posts 1,550

|
Re: AR6 throwing exception during save...
|
|
|
|
|
Hello,
The error that you mention comes should come when you are trying to load some RPX creating in ActiveReports for .Net 3.0 and already in your database into ActiveReports6. You may write a small application using the latest build of ActiveReports for .NET 3.0 to convert all these RPX with ActiveReportsLayout Version="4" to ActiveReportsLayout Version="3.1" so that they can be loaded into ActiveReports6. You may use code as follows.
DataDynamics.ActiveReports.ActiveReport3 rpt = new DataDynamics.ActiveReports.ActiveReport3(); rpt.LoadLayout("...Path in database...."); rpt.SaveLayout("..Same Path in database..");
Regards, Prantik
|
|
|
|
|
Report
|
|
|
|
03-16-2010, 11:09 AM
|
sims
Joined on 09-17-2004
Posts 17
|
Re: AR6 throwing exception during save...
|
|
|
|
|
Prantik,
Your proposed solution will work for developers, but not end users. They are not going to install a new application just to convert their custom reports. We will run into the following issues:
1) Some reports are stored in a database so this new application now must have access to a production SQL database which means writing a whole lot more than 3 lines of code.
2) Writing a new utility that must be executed by the user means developing new documentation, training videos, and handling an increased load on our support personnel as they try to walk users through the conversion.
3) Users will invariably forget to convert some of their reports.
How can we resolve this issue using AR6? If there is no workaround, will this be classified as a defect and corrected in the next hotfix?
- Chris
|
|
|
|
|
Report
|
|
|
|
03-17-2010, 7:38 AM
|
SankalpS
Joined on 12-11-2008
Posts 2,414

|
Re: AR6 throwing exception during save...
|
|
|
|
|
Chris,
I have asked the development team to provide some suggestions on this issue. I will provide you with an update as soon as I hear from them.
Regards, Sankalp
Sankalp Sen GrapeCity- DataDynamics
|
|
|
|
|
Report
|
|
|
|
03-17-2010, 3:08 PM
|
AnkitN
Joined on 03-03-2009
Posts 844

|
Re: AR6 throwing exception during save...
|
|
|
|
|
Hello,
Could you please let me know in which build of ActiveReports for .Net 3.0 your RPX were created? As far as I know the RPX files build in the ActiveReports for .Net 3.0 has the ActiveReportsLayout Version="3" not the 4.0 as you had mention in your previous post. I would also like to inform you that the RPX files build in the any previous version of ActiveReports can be loaded to the latest version of ActiveReports i.e Activereports 6.
Any further information provided to isolate the issue would be appreciated.
Regards, Ankit Nigam
|
|
|
|
|
Report
|
|
|
|
03-18-2010, 3:29 AM
|
tomperren
Joined on 01-08-2010
Posts 12
|
Re: AR6 throwing exception during save...
|
|
|
|
|
Hi,
We were using Active Reports for .NET version 4.2.1.1238 to write out the report - this still (as you say Ankit) specifies:
ActiveReportsLayout Version="3" PrintWidth="15736" DocumentName="ARNet Document" ScriptLang="C#" MasterReport="0"
(See attached). I wondered if the problem was related to the UTF encoding which seemed to give me an error (last week) when I attempted to load it into some tool or another (possibly Altova XML Spy) - saying that there were characters within that were not allowed for the encoding specified.
It seems that although Chris' problem exhibits similar symptoms it may not be the same issue...
Regards,
Tom (see attachment for the report causing the problem)
|
|
|
|
|
Report
|
|
|
|
|
|
Page 1 of 2 (27 items)
|
1 2 > |
|
|
|
GrapeCity » Product Support » ActiveReports 6... » Re: AR6 throwing exception during save...
|
|
|
|
|