473,394 Members | 1,865 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Unable to navigate Crystal Report

I am using Visual Studio 2005 Professional edition and built in CR version
10.2.3600.0 to create a web application.

The front-end to the report is written in C#. Basically Report.aspx creates
the datasets that the report needs then creates an instance of the strongly
typed report then passes the populated dataset to the report then sets the
report viewer to the report object.

When the application is run, the report is created just fine, but when I
click on any of the Crystal Reports toolbar functions such as next, print
....etc the page goes blank.

What should I do? Thanks in advance

Alex

Oct 18 '07 #1
2 1949
We have an expression at work: "Yay, Crystal!"

The problem is that you are not storing the Crystal Report in a
session. One of the hardest thing to do is make sure the report stays
around between postbacks.

You essentially write your code so that it either pulls from the
session or it creates a new one. Once you create it, it is not such a
big deal.

But, yeah, they didn't make it easy to maintain the report across
postbacks. It would have been nice if the report viewer managed it for
you (or if it could be made AJAX-enabled).

private static object ReportSource
{
get
{
const string CRYSTAL_SOURCE = "___CRYSTAL_SOURCE_SESSION_ID";
if (HttpContext.Current.Session[CRYSTAL_SOURCE"] == null)
{
HttpContext.Current.Session[CRYSTAL_SOURCE"] =
getReportSource(); // gets your report source
}
return HttpContext.Current.Session[CRYSTAL_SOURCE"];
}
}

Then you can use it like this:

void Page_Load(object sender, EventArgs e)
{
crystalReportViewer1.ReportSource = ReportSource; // automatically
generates the report if necessary
}

Oct 19 '07 #2
Thank you very much.

"je**********@gmail.com" wrote:
We have an expression at work: "Yay, Crystal!"

The problem is that you are not storing the Crystal Report in a
session. One of the hardest thing to do is make sure the report stays
around between postbacks.

You essentially write your code so that it either pulls from the
session or it creates a new one. Once you create it, it is not such a
big deal.

But, yeah, they didn't make it easy to maintain the report across
postbacks. It would have been nice if the report viewer managed it for
you (or if it could be made AJAX-enabled).

private static object ReportSource
{
get
{
const string CRYSTAL_SOURCE = "___CRYSTAL_SOURCE_SESSION_ID";
if (HttpContext.Current.Session[CRYSTAL_SOURCE"] == null)
{
HttpContext.Current.Session[CRYSTAL_SOURCE"] =
getReportSource(); // gets your report source
}
return HttpContext.Current.Session[CRYSTAL_SOURCE"];
}
}

Then you can use it like this:

void Page_Load(object sender, EventArgs e)
{
crystalReportViewer1.ReportSource = ReportSource; // automatically
generates the report if necessary
}

Oct 19 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Stephan | last post by:
Hi, I'm using Visual Studio 2003 (C#) with the integrated Crystal Report software and have the following question: How can I assign a value (string) to an unbound (string) field in Crystal...
0
by: Mats | last post by:
Hello everyone ! I am using Crastal Reports for VS.Net and I have an assembly with several projects in one of them I have two Crystal reports. Although they worked fine for weeks and I haven't...
0
by: Matt Theule | last post by:
Visual Studio 2002, Crystal Reports.NET I am unable to set the text of a text object in a crystal reports report. I have found lots of examples for doing this, and what I have does not throw...
0
by: Bas Groeneveld | last post by:
For some reason I am unable to drag a CrystalreportViewer from the toolbox onto my web form design surface in VS.NET 2003 - I get a black circle with a diagonal line through it. I have installed...
0
by: Henry | last post by:
I have written an ASP/VB.Net application via VS 2003 (Crystal V9) that uses MS Access 2000 as its database. I can export reports that have no linked sub reports for printing. However, I'm unable...
1
by: Izzy | last post by:
I created a windows service using VS 2005 in VB.NET and it runs on my Windows XP Pro machine just fine, now I'm want to install it on one of my servers which is a Windows 2000 Terminal server...
0
by: ivce970 | last post by:
Hi everyone, I'm wruiting this message again cause I really need some help. I have installed VS NET 2003 and SQL Server 2005 Expess edition. I made a db for my small business with books,...
0
by: Dennis | last post by:
We are using Crystal XI R2 in an ASP.NET 2.0 application. We have a report viewer on a page and we use it to display a report that has parameters. When the page first loads, it displays the...
11
by: =?Utf-8?B?cmtibmFpcg==?= | last post by:
How can I stop receiving this message while calling a crystal report? "The report you requested requires further information." Thanks
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.