Solved

Problem using XML datasource in Crystal Reports 9 and C#

Posted on 2004-04-28
7
646 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

738 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