Solved

Problem using XML datasource in Crystal Reports 9 and C#

Posted on 2004-04-28
7
627 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

706 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now