Data Connectivity
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Data Connectivity
Message Icon Topic: Report does not load in web server but local ok Post Reply Post New Topic
Author Message
tic.franca
Newbie
Newbie


Joined: 04 Oct 2011
Location: Brazil
Online Status: Offline
Posts: 1
Quote tic.franca Replybullet Topic: Report does not load in web server but local ok
    Posted: 04 Oct 2011 at 6:04am

I'm working with vs 2010 C#, iis7 and Crystal Reports 2010 .

I did a Report and it works fine when I'm in development environment debbuging in my local machine.

But , when I publish the application in the server, everything works fine, except the report.

When I click the buttin that calls it, the screen where it should be opened appear in blank.

Plaease help me..

Thanks in advance.

 

Thiqago

 

using

System;

using

System.Collections.Generic;

using

System.Linq;

using

System.Web;

using

System.Web.UI;

using

System.Web.UI.WebControls;

using

CrystalDecisions.CrystalReports.Engine;

using

CrystalDecisions.Shared;

using

JCI.Intranet.Business.Facade;

using

System.Configuration;

 

 

namespace

JCI.Intranet.Web.TwcPortal

{

public partial class ReportTwcSales :

PageBase

{

protected override void Page_Load(object sender, EventArgs e)

{

int idUserInsert = Convert.ToInt32(HttpContext.Current.Items["USERID"].ToString());

ReportDocument cryRpt = new ReportDocument();

TableLogOnInfos crtableLogoninfos = new TableLogOnInfos();

TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();

ConnectionInfo crConnectionInfo = new ConnectionInfo();

Tables CrTables;

cryRpt.Load(Server.MapPath("TwcSales.rpt"));

crConnectionInfo.ServerName =ConfigurationManager.AppSettings["ServerName"];

crConnectionInfo.DatabaseName =ConfigurationManager.AppSettings["DatabaseName"];

crConnectionInfo.UserID =ConfigurationManager.AppSettings["UserID"];

crConnectionInfo.Password =ConfigurationManager.AppSettings["Password"];

CrTables = cryRpt.Database.Tables;

foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in CrTables)

{

crtableLogoninfo = CrTable.LogOnInfo;

crtableLogoninfo.ConnectionInfo = crConnectionInfo;

CrTable.ApplyLogOnInfo(crtableLogoninfo);

}

cryRpt.RecordSelectionFormula = "{TB_TMP_TWCSALES.ID_UserInsert} = " + idUserInsert.ToString();

crvTwcSales.ReportSource = cryRpt;

crvTwcSales.RefreshReport();

}

 

IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.030 seconds.