Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Reports development inside VS 2005

Status
Not open for further replies.

JScannell

Programmer
Jan 9, 2001
306
US
This is my first attempt at designing a Crystal Report entity inside the VS 2005 IDE. One of the things that seems to be missing is the dialog box where you can create your SQL query that will be applied to the report object. I can select tables but can't find where I can create an actual query.

Should I abandon creating the report object this way and just do it using a Crystal Reports design tool and then import the .rpt to the VS project? Or is there some way I can do this within the IDE?

Also, I don't see where you could apply parameters to the report object. Is that something that will become clearer once I can properly create the report object?

Thanks in advance,

Jerry Scannell
 
i push a datatable to the report rather than have the report pull data from the database. Data validation is much easier this way.

you can setup parameters for the report once you create the report. there are crystal report tabs within the IDE which let you navigate the tables, layout, parameters/functions, etc.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
Thanks.

now I have a new issue. My application is using SQL Server files (as opposed to connecting to a server). but, I can preview the data in my table through the data Sources window, but when I run my report viewer, there is no data.

one thing that, to me is strange, is that VS copies the .mdf and .ldf files into the debug folder upon building. why? Could that be my issue?

Jerry Scannell
 
the mdf and ldf are the database files. most likely 2005/2008 express. why it's not displaying data could be any number of reasons. you will need to debug the code to determine where it's failing and how.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
Is there a way to debug the code behind the crystal report object? I couldn't seem to find any. There is code that is run when the "InitializeComponent()" is run. I stepped through and found a method called "resourcename()" that simply returned the name of the .rpt file. I attempted a F11 (step into) from there but all that happened next was the display of the empty report./

Jerry Scannell
 
this is the problem with letting WYSIWYG write code for you, you cannot debug it. if the sql is defined within the report and the report is associated with a report viewer, and parameters are declared via markup, then you will have a difficult time debugging the error. you can try activating the asp.net trace logging to see what's happening.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
I just looked up how to enable trace logging and it seems to be only allowed on .net web pages.

I'm writing an executable application.

Jerry Scannell
 
I'm confused, are you working on a webforms or MVC application? if not then why are you posting in the asp.net forum? if you are then you can enable logging as your application runs on top of asp.net.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
Where should I post this, then? I will move it to there as soon as you let me know.


Jerry Scannell
 
it really depends on the problem. either a crystal report forum or the language you write in (VB/C#) would be better. before making another post try to find out exactly what is failing. check the event logs too.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top