TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
prabhu.senthil
NA
5
0
Crystal report with xml as datasource and export as pdf
Jun 23 2009 7:59 AM
Guys,
I have XML and its corresponding XSD file and its report file. All i want is to bind the XML data to the report and export the report as PDF. I am using Visual Studio 2003. The following is the code.
try
{
DataSet dsXml =
new
DataSet();
dsXml.ReadXml(@"C:\Temp\CONSUMERWO_20000001.xml");
ReportDocument rpt =
new
ReportDocument();
rpt.Load(@"C:\Temp\CONSUMERWO.rpt");
rpt.SetDataSource(dsXml.Tables[0]);
rpt.ExportToDisk(ExportFormatType.PortableDocFormat, @"C:\Temp\" + Guid.NewGuid().ToString() + ".pdf");
}
catch
(Exception Ex)
{
txtMessage.Text = "Exception: " + Ex.Message;
}
Error: Exception: This field name is not known.
Details: errorKind
Error in File C:\DOCUME~1\SENTHI~1.PRA\LOCALS~1\Temp\{CF274BB7-E0F0-40D4-AA9D-DC0AB7724FFE}.rpt:
Error in formula <Serv>.
'WHILEREADINGRECORDS;
'
What could be the problem. Am I missing something. Am new to Crystal.
Thanks in Advance
SP
Reply
Answers (
2
)
Starting C# on my own!!!
Attach File to Lotus Notes Email