473,320 Members | 2,177 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,320 software developers and data experts.

C# forms app - Crystal Reports question

69
Hello all...

I have a C# forms application that I am developing using MS Visual Studio 2005. I am trying to add some Crystal Reports to this application using the built in Crystal Reports tools with Visual Studio.

It seems like it should be pretty straight forward, but no matter what I do I can't get my reports to actually show data. Here's the info:

I created a crystal report viewer on a form. I created a crystal report that has a data source of a table in my database. Nothing fancy... just showing some of the fields from the table on the report. Whenever I use the preview button in the design of the report it fills it in with generic data (not pulling from my database).

I have the following code to load the report into the viewer:

Expand|Select|Wrap|Line Numbers
  1. TestReport rptTest = new TestReport();
  2.             CrystalDecisions.Shared.ConnectionInfo crDbConnection = new
  3.               CrystalDecisions.Shared.ConnectionInfo();
  4.             crDbConnection.IntegratedSecurity = true;
  5.             crDbConnection.DatabaseName = "accessgwc";
  6.             crDbConnection.ServerName = "Access-server2";
  7.             CrystalDecisions.CrystalReports.Engine.Database crDatabase =
  8.               rptTest.Database;
  9.             CrystalDecisions.Shared.TableLogOnInfo oCrTableLoginInfo;
  10.             foreach (CrystalDecisions.CrystalReports.Engine.Table oCrTable in
  11.               crDatabase.Tables)
  12.             {
  13.                 oCrTableLoginInfo = oCrTable.LogOnInfo;
  14.                 oCrTableLoginInfo.ConnectionInfo = crDbConnection;
  15.                 oCrTable.ApplyLogOnInfo(oCrTableLoginInfo);
  16.             }
  17.  
  18.  
  19.             crystalReportViewer1.ReportSource = rptTest;
At runtime it loads the report when I push the button, and I can see the data labels, but no data. All of my other database functions (and there are a lot of them) work fine in this application, so I know it's not a database connectivity problem. I think I'm just such a newbie to Crystal Reports, that I'm missing something.

Does anyone know what I'm missing? Is there a way I can preview this report and see real data in it (prior to runtime)? I would really appreciate any help.

If you need more details just let me know.

Thanks,
Rod
Apr 3 '08 #1
1 1472
narpet
69
Sorry to bump this message, but I'm really hoping someone can lead me in the right direction.

Thanks in advance!
Apr 3 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: rAGHU | last post by:
Hi, In my ASP.NET web application project we need to design crystal reports with Crystal Reports version 8.5 enterpraise edition(Please Note:It is not the Crystal Reports that comes with...
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...
2
by: Ashish Shridharan | last post by:
Hi All, I'm not very sure if this is the forum for my question but i was hoping someone could direct me to the right place (or answer my question). I am using the .NET crystal report viewer...
2
by: Phil | last post by:
There's a Crystal Reports hot fix for a particular but that I am experiencing in .NET -- DIV's get screwed up when you embed a Crystal Report in a web page. The bug is ADAPT00170558, the patch is...
10
by: Joriz | last post by:
Obviously im new with ms access..so my basic question is how do i run crystal reports in my ADP. I also pass parameters to cyrstal reports. Please help! thanks in advance
19
by: LP | last post by:
I am using (trying to) CR version XI, cascading parameters feature works it asks user to enter params. But if page is resubmitted. It prompts for params again. I did set...
5
by: Jay | last post by:
I am getting mixed messages from the asp.net website hosting providers - some say they do not support Crystal Reports due to a $25,000 per cpu licensing fee, others say all I need to do is install...
4
by: sklett | last post by:
I've developed an ERP application that we use internally and works quite well. I receiving more and more requests from users to print various transactions, order forms, search results, etc. I...
1
by: =?Utf-8?B?VGVycnk=?= | last post by:
I am brand new to using Crystal Reports and am trying to generate a report based on a custom object - in another project. I have a layered design, with all my business objects in a seperate...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.