No data in Reports, but the headers show up fine

C#, VS Pro 2005.....

OK, so I've tried the simple approach of creating a form, adding a CR Viewer and ReportDocument to the form, selected just one field from a table (as a simple test - I've tried more complex ones as well).

When I run the app and view the form, the report shows up blank, but with the headers visible. Refresh does nothing but, well, refresh the headers.

Yep, the Viewer is set to the report name. The preview function shows nice test data having nothing to do with my data - so that doesn't help.

Is there a secret handshake to enable actually getting data in a report Something on the order of the way a form is launched: Ie, Form myForm = new Form(); myForm.Show();

Gracias,

G.

Yep, I've read over the docs at Business Objects site - no help.



Answer this question

No data in Reports, but the headers show up fine

  • Dania151638

    More info

    Data is hosted in SQL Server 2000.

    By selecting an MS Access file I CAN get data to appear. However, since my data is in Server, this does not help.

    There appears to be no way to select an .MDF file so I can't get to the Server data file that way. The .XLS choice does not work as there are no data under the listing, just the Clear() method.

    G.


  • Big Ben

    The problem was that the report file had to be copied to the Bin\Debug directory (don't ask me...).

    For some reason the report, when run in debug mode, is not referenced if it is in the project dir along with all the rest of the code.

    Thanks for the effort

    G.


  • John Ericson

    I am using the reduced code method, and have the DB set up for win authentication. All forms that connect, including the data sources I need for the report, work fine without extra login info. I can get data to a report through a MS Access file, but Crystal does not allow using a path to a MDF file through the data sources expert. I use the ADO.Net project data sources, and have tried all of the others as well - no change.

    The data sources are retreived using the tableadapter.Fill method called when the host form is selected, and the data previews in the adapter just fine from the designer. The report preview does NOT give me the data source data (just dummy data) - I don't know if this is normal behavior or not.

    I've downloaded and gone through all of the references on the BO site having to do with VS 2005 - no help. The reduced code example works with my MS Access DB; I did not use the XTreme DB example as I do not need that type of connection.

    I registered CR and then did a complete reinstall of VS 2005. Do I need to re-register CR

    Is there anything extra that has to be coded using the reduced code method

    Thanks

    G.


  • Jing Sun

    More info....

    If I created the report and viewer using the reduced code method, and all other forms work OK, why would I need to pass a path, etc. for the report

    I downloaded the tutorial example files and ran them as-is. NONE worked, all gave blank reports or wanted a login (the ones using the Xtreme datasets).

    There has to be something simple wrong. Why can I see an Access DB report, yet not a SQL Server 2000 data sourced report, and all forms work OK

    I also followed the series listed on the BO site for coding your own - the errors include "crystalReportViewer does not exists..." etc. (all of the CrystalDecisions.CrystalReports.Engine components) as invalid - ie: compiler had no idea where they came from. Yep, the "using CrystalDecisions.CrystalReports.Engine; and using CrystalDecisions.Shared;" are in both the main form and the report host form headers. Go figure.

    Day 11 and counting.

    G.


  • BringerOD

    More info...

    In the report, the correct number of records is displayed on the menu bar...BUT...there are the same # of pages as records!

    Still NO DATA, only headers.

    The tableadapter is called correctly in the form code that hosts the report, and the adapter previews the correct data OK.

    What is supposed to go in the auto generated :

    private void crystalReportViewer1_Load(object sender, EventArgs e)

    {

    }

    Gotta luv it !

    G.


  • Hi_GC

    Hi,

    I had the same problem, but then I followed the procedure in the MSDN library exactly from a new project and it worked. See link below:

    Creating a Windows Project with a CrystalReportViewer Control

    Thanks

     

     

     


  • Lixin D

    I'd say you found a work around. This is not a solution. I spent two days messing with trying to fix a "Logon Failed" problem. I did get an email from BO with a half dozen links. One solution (didn't work) is to create an additional setup project for the Crystal reports. You have to be kidding. I just wish MS would stop tormenting us by including this app in Visual Studio.
  • WizDum

    Hello,

    Are you passing the database logon information to the report before you try viewing it

    Here is a link to the online help:

    http://support.businessobjects.com/documentation/product_guides/cr_net/vs_2005/

    There are sections in there on Data Connectivity and tutorials that walk through this.

    and the Developer Zone site:

    http://businessobjects.com/products/dev_zone/

    The Developer Zone has a number of getting started guides for Crystal Reports for Visual Studio .NET.

    Keith - Business Objects



  • genyded

    Feelin' kinda lonely what with me being the only one to post to my own messages....

    More info:

    Registered Crystal (first time in 2 weeks the I saw a pop-up wanting registration). No change.

    Reinstalled VS Pro 2005, uninstalled all of VS 2003. No change.

    Created new datasource and tried is as source form report. No change.

    Guys, I am absolutely stuck at this point. Any wanna-be heroes out there You get 1,000 points for the correct answer.

    Thanks

    G.


  • No data in Reports, but the headers show up fine