Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Problem using Crystal Report .NET in ASP.NET Post Reply Post New Topic
Author Message
fabu1971
Newbie
Newbie


Joined: 16 Apr 2008
Location: Puerto Rico
Online Status: Offline
Posts: 1
Quote fabu1971 Replybullet Topic: Problem using Crystal Report .NET in ASP.NET
    Posted: 16 Apr 2008 at 10:55am
I developed an ASP.NET web page using as object Crystal Report. I'm using multiview. After the report run, when I clicked Export or move to the next page, the web page goes blank. I tried in different ways to see the report. I have the following code:

protected void Page_Load(object sender, EventArgs e)
{ // Begin Page_Load

if (!Page.IsPostBack)
{ // Begin if
mvwReport.SetActiveView(viewParameterPrompt);
} // End if

} // End Page_Load

To open the report I have the following code:

CrystalReportViewer1.ParameterFieldInfo = myPFs;
CrystalReportViewer1.RefreshReport();
mvwReport.SetActiveView(viewReportOnDemand);

I don't understand why when I click any button of Crystal report the report goes blank. I hope that someone can help me to handle this issue. I appreciate any help or suggestion or idea.


IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 16 Apr 2008 at 11:39am
I haven't used multiview with Crystal Reports before, but one thing you should be doing is putting your CR code in the Page_Init() event. Putting it in the page load event messes things up with viewstate and the report rendering and causes all kinds of problems with invalid report pages showing up. So I suggest reworking your code so that all reporting code is in Page_Init() and that will probably help you out a lot.

I cover different ways to work with the report object model in my Encyclopedia Vol 2 book. You can find out more about my books at Crystal Reports eBooks online.

Edited by BrianBischof - 16 Apr 2008 at 11:40am
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
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.016 seconds.