Solved

Problem using XML datasource in Crystal Reports 9 and C#

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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

713 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