473,799 Members | 3,224 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1966
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_SOU RCE_SESSION_ID" ;
if (HttpContext.Cu rrent.Session[CRYSTAL_SOURCE"] == null)
{
HttpContext.Cur rent.Session[CRYSTAL_SOURCE"] =
getReportSource (); // gets your report source
}
return HttpContext.Cur rent.Session[CRYSTAL_SOURCE"];
}
}

Then you can use it like this:

void Page_Load(objec t sender, EventArgs e)
{
crystalReportVi ewer1.ReportSou rce = ReportSource; // automatically
generates the report if necessary
}

Oct 19 '07 #2
Thank you very much.

"je**********@g mail.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_SOU RCE_SESSION_ID" ;
if (HttpContext.Cu rrent.Session[CRYSTAL_SOURCE"] == null)
{
HttpContext.Cur rent.Session[CRYSTAL_SOURCE"] =
getReportSource (); // gets your report source
}
return HttpContext.Cur rent.Session[CRYSTAL_SOURCE"];
}
}

Then you can use it like this:

void Page_Load(objec t sender, EventArgs e)
{
crystalReportVi ewer1.ReportSou rce = 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
19187
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 Report at runtime? Example: private void button1_Click(object sender,
0
4944
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 changed them, now I get the following error in both: "Unable to find the report in the manifest resources. ..." I checked the build action ("Embedded resource"), the vb-file in case of the property "ResourceName" (same return value as the name of...
0
1534
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 any errors or warnings, but in my displayed report, the textobject in question is not being changed. Code: crReport1 Rpt = new crReport1 (); TextObject to = (TextObject) Rpt.ReportDefinition.
0
1171
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 the Crystal Reports components with my VS.NET and am able to add a new Crystal Report to the project (File|Add New Item|Web Project Items|Crystal Report. I assume that something has not been installed correctly. Does it need VB to be...
0
2727
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 to export reports that have linked subreports. I receive (a "Missing parameter field current value") on the following statement: Me.crReportDocument.Export() The main report requires 4 parameters. The linked reports do not require any...
1
17641
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 running sp4 version 5.00.2195. I also have .NET Framework 1.0, 1.1 and 2.0 installed on this server AND the server was rebooted after the .NET Framework 2.0 was installed. I had some custom actions set up in the installer class, thinking that might...
0
1340
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, stores etc. In it I have a table called stores with these columns: storeID (int, NOT NULL) storeName (varchar, 40)
0
1196
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 prompts to enter the parameters. You enter the parameters and then the first page of the report displays fine. But when you try to navigate through the report - go to the next page, enter a page number directly, print, export - it refreshes the page...
11
9700
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
10470
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10247
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10214
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10023
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6803
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5459
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5583
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3751
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2935
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.