kbf1984

I have created a webpage that uses crystal reports that calls a database to retrieve information people have saved to the database. I can get it to work just fine on my machine, but when I publish it to the web server, it does not work. I know the web server does not have crystal reports loaded, but I found where I could add a project called WebSetup that has Content Files and the microsoft_vc80_atl_x86.msm file with it which is supposed to generate an .exe file or startup file. It does neither, so if anyone can help me with this issue, it would be appreciated.

Re: Crystal Reports for Visual Studio Publish webpage with crystal reports

Adamus Turner

My guess would be authentication to populate the dataset your report is using.

Can you elaborate on exactly what isn't working

The Crystal Report shows a blank page

No error is thrown

The webpage itself doesn't load

Adamus






Re: Crystal Reports for Visual Studio Publish webpage with crystal reports

Flinky

Adding a WebSetup project with Content Files and MSMs is associated with merge module deployment. This produces a .exe file that you can send to users so that they may view your webpage. Your description doesn't give enough information for me to point you in the right direction concerning WHICH msm to use but as a starting point, I would look through the deployment documentation: http://msdn2.microsoft.com/en-us/library/ms225299(VS.80).aspx
This will hopefully help you muddle through what needs to be done. If you are using a later Crystal Reports version such as XIR2, there is also the option of using Windows Installer deployment which completely bypasses the need to determine which merge modules to attach.




Re: Crystal Reports for Visual Studio Publish webpage with crystal reports

kbf1984

Thanks,

That helped me out a lot. I can now open my web page after doing the windows install. But I am still having a small problem and I can not figure it out. When I go to view the crystal report, the page will not go pass the page where you enter in the parameters. Says an error on the page. How can I fix this or what is causing the error.





Re: Crystal Reports for Visual Studio Publish webpage with crystal reports

Flinky

To be able to help you with this error, you would need to provide more information, i.e. What is the exact error Where in your code is it pointing to etc. That may help narrow down how to fix it. Is it possible that it is not a deployment issue but more so a coding issue First try going through your code quickly and see if you may have made a small mistake in coding. I always find that sometimes when I code pretty quickly, I make a few smaller mistakes that I later on easily catch by giving my code a run-through.





Re: Crystal Reports for Visual Studio Publish webpage with crystal reports

kbf1984

I compile the website on my machine and everything works out just fine. It when I publish the site to our web server and call the site this part works fine. The part that doesn't work is after the site prompts you for the parameters and press enter. The page says there is an error on the page. I don't see where there is an error, cause this does not happen on my local machine, just when I have published it to the web server. This does not happen with any other web sites we have on the server. So I do not even know where to start, my thought is maybe I am still missing something for the crystal report



Re: Crystal Reports for Visual Studio Publish webpage with crystal reports

Flinky

hmmm... If you used the Windows Installer method, the only thing I can think of is after adding the content files and the primary output, if your version of CR is .NET 2003, then you would need to exclude all automatically added dependencies.





Re: Crystal Reports for Visual Studio Publish webpage with crystal reports

Flinky

By chance, are you using "Dynamic Cascading Parameters" By, Dynamic Cascading Parameters I mean where one parameter can specify the next one. For example, if your first parameter is USA, based on the result of this, your second parameter would then be able to populate the states found in the US. (eg. CA).


If this is the case, then I may be able to determine why your report is not working when deployed. Dynamic Cascading Parameters only work with the full product. Meaning for example, if you developed on machine that has VS2005 and CRXIR2. When you deploy an application using MSIs, you're not sending out the full product and therefore that could be the reason why your parameters seem to be crashing.




Re: Crystal Reports for Visual Studio Publish webpage with crystal reports

kbf1984

Ya I am using dynamic Parameters. That could be the problem, so the only solution is to...Install the Crystal Reports function of VS2005 or do I have to install all of VS2005 in order for this to work.



Re: Crystal Reports for Visual Studio Publish webpage with crystal reports

kbf1984

If this is the case, is it possible for me to have the user enter the information first then generate the report with those parameters already desided..



Re: Crystal Reports for Visual Studio Publish webpage with crystal reports

Flinky

You would need to install the msi that is associated with Crystal Reports XIR2 and not VS2005.





Re: Crystal Reports for Visual Studio Publish webpage with crystal reports

kbf1984

Thanks, I got past the error now I appreciate the help. I was installing the msi file, but it was the one for .Net 2.0 not Crystal Reports XIR2.

But now it is not allowing me to access the database. I have the following code.

Code Snippet

using System;

using System.Data;

using System.Configuration;

using System.Collections;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

using CrystalDecisions.CrystalReports.Engine;

using CrystalDecisions.Shared;

public partial class CrystalReportView : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

}

private void ConfigureCrystalReports()

{

ConnectionInfo connnectionInfo = new ConnectionInfo();

connnectionInfo.ServerName = "server";

connnectionInfo.DatabaseName = "database";

connnectionInfo.UserID = "user";

connnectionInfo.Password = "password";

string reportPath = Server.MapPath("CrystalReportDenver.rpt");

crystalReportViewer.ReportSource = reportPath;

SetDBLogonForReport(connnectionInfo);

}

private void Page_Init(object sender, EventArgs e)

{

ConfigureCrystalReports();

}

private void SetDBLogonForReport(ConnectionInfo connectionInfo)

{

TableLogOnInfos tableLogOnInfos = crystalReportViewer.LogOnInfo;

foreach (TableLogOnInfo tableLogOnInfo in tableLogOnInfos)

{

tableLogOnInfo.ConnectionInfo = connectionInfo;

}

}

}

I just don't see what is wrong, for it is exactly from what I have seen in tutorials, posts, and online help. If anyone can help me solve this issue, it would be a great help.





Re: Crystal Reports for Visual Studio Publish webpage with crystal reports

Flinky

Not sure if this would make a difference, but try moving these 2 lines to before the "ConnectionInfo connectionInfo = new ConnectionInfo()" line:


string reportPath = Server.MapPath("CrystalReportDenver.rpt");

crystalReportViewer.ReportSource = reportPath;






Re: Crystal Reports for Visual Studio Publish webpage with crystal reports

kbf1984

Well I tried moving those two lines of code, and it did not help any. it still will not let it go past the connection window even though I have the connection string coded written as above. Any help with this issue will be greatly appreciated.