Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Paging slow reloads report Post Reply Post New Topic
Author Message
demetrios
Newbie
Newbie


Joined: 25 Oct 2010
Online Status: Offline
Posts: 1
Quote demetrios Replybullet Topic: Paging slow reloads report
     Posted: 25 Oct 2010 at 3:03am
Hi

I have a crystal report 2008 in a asp.net 3.5 web page.

The report loads and work ok.
The problem is that every time you change page it is reloading the report then displaying the page.
So if a report takes a minute to load initially then every time you change page it will take a minute.

I am using an SQL Server 2005
When i run the report in Crystal Reports 2008 Designer paging is very fast.
When i run it in my asp.net 3.5 C# page then paging is slow.

Crystal report verion: CrystalDecisions.Web, Version=12.0.2000.0

Please find below my code.
Thank You for your help

page.aspx.cs
public ReportDocument MyReportObject = new ReportDocument();
string strTitle;
string strMenu;
string strDatabase;


protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//Connect to database
var crConnectionInfo = new ConnectionInfo();
SqlConnectionStringBuilder csb = new SqlConnectionStringBuilder(ConfigurationManager.ConnectionStrings\"TheConnection\".ConnectionString);


{
crConnectionInfo.ServerName = csb.DataSource;
crConnectionInfo.DatabaseName = csb.InitialCatalog;
crConnectionInfo.UserID = csb.UserID;
crConnectionInfo.Password = csb.Password;
}


TableLogOnInfos mytableloginfos = new TableLogOnInfos();
mytableloginfos = CrystalReportViewerMain.LogOnInfo;
foreach (TableLogOnInfo myTableLogOnInfo in mytableloginfos)
{
myTableLogOnInfo.ConnectionInfo = crConnectionInfo;
}
}
}


protected void CrystalReportViewerMain_Unload(object sender, EventArgs e)
{
MyReportObject.Clone();
MyReportObject.Dispose();
}


protected void CrystalReportViewerMain_OnInit(object sender, EventArgs e)
{


MyReportObject.Load(Server.MapPath("TheReport"));


CrystalReportViewerMain.ReportSource = MyReportObject;
CrystalReportViewerMain.HasCrystalLogo = false;
//CrystalReportViewerMain.HasToggleGroupTreeButton = false;
CrystalReportViewerMain.DisplayGroupTree = false;
CrystalReportViewerMain.HasRefreshButton = true;
}




Please advise.
Thank you for your help
IP IP Logged
HowardDavis
Newbie
Newbie


Joined: 22 Feb 2011
Location: United States
Online Status: Offline
Posts: 6
Quote HowardDavis Replybullet Posted: 23 Feb 2011 at 4:17am
You need to cache the rpt variables in a Session Variable.  
IP IP Logged
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