Upgrade reports in a project


11-08-2005, 4:18 AM
Ok.  I have looked and can't find the answer.  I just installed VS 2005 PRO and downloaded the latest Beta of .NET for 2005.

I load my VS 2003 project and the wizard converts the application for me.  I can compile and run it, and it works great.  Only problem is that the reports don't work.  It seems like it seperates some of the files.

What can I do to get my VS 2003 Active Reports 1.0 reports to convert over correctly to the new VS 2005 Active Reports 2.0.

Thanks,
Cory Jorgensen
Bitco Software
Thank you,

Cory Jorgensen
Bitco Software

Re: Upgrade reports in a project


11-08-2005, 9:47 AM

Hello,

          This is a windows application am I right? Make sure the references are updated for the active reports. Do you get any exceptions when you run the project? Make sure you have the new viewer control on your form. Also are correct assemblies installed in GAC? (C:\windows\assembly). I have converted so many projects with VS2005 wizards with active reports in it and never had any problems. Can you give me a sample project which had the earlier version of Active reports installed on it. I would try to convert and see what is going on.


Rakesh Jani

Re: Upgrade reports in a project


11-08-2005, 10:56 AM

No, this isn't a windows project.  It is a web project.  When the wizard converts it, it takes the .vb file and put it under another directory called App_Code.  When I try to view the code it can't find the reference to the code and when I run it, this is the error I get.


DataDynamics.ActiveReports.ReportException: Can't load report layout - resource "PermitTraxAdmin.rptCustomData.rpx" is not available (check if renamed, moved, or deleted).

at DataDynamics.ActiveReports.ActiveReport.LoadLayout(Type type, String resourceName)

at PermitTraxLogin.rptCustomData.InitializeReport() in c:\inetpub\wwwroot\PermitTrax\App_Code\admin\Reports\rptCustomData2.vb:line 74

at PermitTraxLogin.rptCustomData..ctor() in c:\inetpub\wwwroot\PermitTrax\App_Code\admin\Reports\rptCustomData2.vb:line 46

at PermitTraxLogin.wfViewReport.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\PermitTrax\Admin\wfViewReport.aspx.vb:line 43

Thanks,
Cory


Thank you,

Cory Jorgensen
Bitco Software

Re: Upgrade reports in a project


11-08-2005, 12:14 PM

Cory,

          As you know VS 2005 Web Projects has changed drastically. These are some steps you need to follow to change your web projects from VS2003 to VS2005. Let me know if you have any difficulties.

1.          Convert the project to a VS 2005 Project
2.          Create an App_Code Folder in the VS 2005 Project
3.          Close the project
4.          Move the reports to the App_Code Folder
5.          Rename the *.cs or *.vb files to *.rpx.cs files or *.rpx.vb
6.          Open the rpx files as xml files
7.          Edit the CodeFile Attribute to *.rpx.cs.


Rakesh Jani

Re: Upgrade reports in a project


11-08-2005, 1:18 PM
I am doing this in VB... so should that be:

Rename the *.vb to *.rpx.vb?

Thank you,

Cory Jorgensen
Bitco Software

Re: Upgrade reports in a project


11-08-2005, 1:41 PM
When I change the name in the XML file, and then open up the report in the designer, it clears the name and puts it back to "".


Thank you,

Cory Jorgensen
Bitco Software

Re: Upgrade reports in a project


11-08-2005, 1:41 PM
Yes but why are you changing the name of the xml files? You don't need to do this. Just right click on rpx, select the openwith option and open in the xml editor. and change the code base.
Rakesh Jani

Re: Upgrade reports in a project


11-08-2005, 1:45 PM
Ok... I got it to work.  The problem was that my files were like this:

report.rpx and report2.vb

When I changed report2.vb to report2.rpx.vb it didn't like the fact it didn't have the same name.  So I changed it to report.rpx.vb and now it is associated correctly.

Thought I would share if anyone else has this problem.

Thanks,
Cory Jorgensen
Bitco Software
Thank you,

Cory Jorgensen
Bitco Software

Re: Upgrade reports in a project


11-10-2005, 10:11 PM

I tried your step by step conversion but still have a problem. In the .vb file there is a reference that can not be resolved.

Public Sub InitializeReport()

Me .LoadLayout( Me .GetType, "ArgoWeb.BalanceSheet.rpx" )
...
...

End Sub

On this LoadLayout call the runtime complains with:
Can't load report layout - resource "ArgoWeb.BalanceSheet.rpx" is not available (check if renamed, moved, or deleted).

However if I add a new report, there is no LoadLayout but instead there is something like this:

Me .XmlLayout = "<?xml version=""1.0"" ......

It looks like the conversion is a lot more complicated than the steps you mentioned.

Don't you have some conversion tool for this? I have a lot of reports to convert and I have spent hours on just this one with no solution.



Re: Upgrade reports in a project


11-18-2005, 3:28 PM

When I converted my project from VS 2003 to VS 2005, the App_Code folder was created during the conversion.  All of my report code behind files were placed in the App_Code folder.  Since my project had the reports in a sub folder by themselves called "reports", the code behind was actually placed in App_Code/Reports.

I have moved the .rpx files to the App_Code/Reports folder, changed the file name for the code behind files as per instructions, and changed the CodeFile attribute in the .rpx file.

I am still getting this same error message:
{ReportName}.rpx is not available (check if renamed, moved, or deleted).

Any further suggestions would be greatly appreciated.