on 10-13-2014 7:49 PM
Hi, guys.
I'm using VS 2013, framework 4.0. So, when I run a report, it comes up blank.
My code
I'm using the latest version of C.R.
Could soebody help me?
VS 2013 is good info. Good additional info may be the version of CR and CR Service Pack
Make sure you are on SP 11:
Move your CR code to Page Init.
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Move your CR code to Page Init.
PAGE_INIT
The Page_Init event is the first to occur when an ASP.NET page is executed. This is where you should perform any initialization steps that you need to set up or create instances of server controls. You don't want to try to access controls in this event because there is no guarantee that they have been created yet. It is during this event that they are created, and you can control whether your attempt to use these objects will be thwarted by the server processing your request before the object has been created.
Note that the Page_Init event fires only the first time the page is loaded. When you use a web form and post back to this page again, the Page_Init event doesn't fire. But the Page_Load event fires each time the page loads.
PAGE_LOAD
This is the page event where you will be doing most of your work. This event occurs only when all the objects on the page have been created and are
available for use.
- Ludek
Hmmm - I'm a bit confused now...
The CR Viewer is just that. A viewer. Much like a PDF viewer. No refresh, no connection to a database. What you see id what you get (essentially a view of a saved data report).
So, what we want to do is go back to your original query re. :
I'm using VS 2013, framework 4.0.
and:
I'm using the latest version of C.R.
That assumed you were using "SAP Crystal Reports, Developer Version for Visual Studio .NET" (v. 13.x). And that you were using Service Pack 10(?). So, now I need you to confim the following:
Version of the crpe32.dll in C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86
Version of the CR assemblies referenced in your project.
Additionally, I assumed you were not providing the full code in your original post, but if you are, then the invocation of the viewer is missing:
CrystalReportViewer1.ReportSource = <the report object> // e.g.; report
Here is basic code I'd like you to try:
Dim crReportDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument
crReportDocument.Load("<path to a report>t")
CrystalReportViewer1.ReportSource = crReportDocument
The above will force the report to prompt for a db logon and parameters - if any.
You may also want to see the following:
Crystal Reports for Visual Studio 2005 Walkthro... | SCN
(the above applies to all versions of CR and .NET)
Developer Help:
SAP Crystal Reports .NET SDK Developer Guide
SAP Crystal Reports .NET API Guide
- Ludek
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.