Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Problem using XML datasource in Crystal Reports 9 and C#

Posted on 2004-04-28
7
Medium Priority
?
663 Views
Last Modified: 2012-08-13
I am trying to get my C# program to open a Crystal 9 report up in a crystal report viewer.  The report is not part of my C# project, it was designed in Crystal Reports 9.  The program simply creates a new crystal report class and then loads the crystal report into the class and then opens the report in the view.  The program generate an XML file before loading the report, and it is this XML file that the report uses as the datasource.  

However, every time I try to preview a report the "Database Login" screen comes up, and asks for the server name, user id, and password.  Since the report should be connecting to an XML file in the same directory it should not require this information.  Does anyone have any suggestions on how I can get the report to use the XML file without asking for anything?
0
Comment
Question by:cerlendson
  • 2
  • 2
7 Comments
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 10943631
The times when this message comes up for me are up are when the report is not finding data that it needs ...

Also this is going through an extra step than required.

You can just push a dataset to the report.

I have had huge numbers of probems dealing with crystal reports "pull" methodology(etting it try to go out and get the data). I have completely given up on them and now only support the push methodology (where you set a datasource to the report)

I am sure the crystal forum people would know more about this as it sounds like a crystal pulling issue.
0
 

Author Comment

by:cerlendson
ID: 10944382
Basically why I'm doing it the way I am is:

I want to have a crystal report viewer in my C# viewer and I want to be able to determine what report the viewer will open at runtime.  The only problem I am having with all of this is that the report viewer keeps asking me for login information for the database no matter what datasource I use in the report.

So if anyone knows a way to do this please let me know.  Even if it doesn't include using a local file.

NOTE:  This program will be placed on many machines, so I don't want to have to set up a DSN on each individual machine.
0
 

Author Comment

by:cerlendson
ID: 10982138
To accomplish my disired task I created a new report class in C# and then passed the class a "Data Table" as the data source (All in code).

Sorry for wasting your time.  I'll ask to have this question removed.
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 10983933
I suggested the methodology that he used but no I dont care, the question was too vague to come up with an answer to the original question.
0
 
LVL 1

Accepted Solution

by:
GhostMod earned 0 total points
ID: 11017858
PAQd, 255 points refunded.

GhostMod
Community Support Moderator
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
Integration Management Part 2
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question