?
Solved

VB.NET Crystal Report Designer

Posted on 2006-10-27
3
Medium Priority
?
510 Views
Last Modified: 2008-02-01
I am just provisionally testing producing a Crystal Report using the embedded CR Designer in VB.Net 2005. I intend to produce a report from an xml file exported from filling a Datatable. To test the technology I have exported a crosstab query from Access 2003 to an XML file. I have then added a new crystal report via the solutions explorer and selected the xml file as the datasource. I have added a few fields to the report from the field explorer and pressed the main report view tab.

The problem is the field headings are showing but the data seems to be some sort of microsoft test data i.e. days of the week and list of colours etc that have nothing to do my data, what happened to the data in the xml file? I double clicked on the xml file which opened in the browser and all the data is present and correct?

I am obviously missing some steps?

I also noticed that Crystal report help (VB.Net embedded) says its only compatible with XML in SQL Server 2005. Does this mean I can't export from a datatable to XML  and run a crystal report?
0
Comment
Question by:JeffvClayton
[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
3 Comments
 
LVL 8

Accepted Solution

by:
bman9111 earned 1500 total points
ID: 17824191
no to export a dataset to xml.

just use

datasetname.writexml("c:\filenameyouwant.xml")
I would say if you not seeing the data then the data source that the crystal is attached too is not loading.

what i would do is in vb.net don't export to xml if you want to display in crystal.

1st. create a dataset with the table scheme desired.
2nd write a statement to grab the data from the access query
3rd link the crystal report to the dataset created

4th at the end of filling you data set make sure you have the setdatasource for the crystal report point to the dataset.

Make any sense or am i way off what you are asking?
0
 
LVL 3

Author Comment

by:JeffvClayton
ID: 17832714
Thanks for the comment.

What I wanted to do was design a crystal report template with relevant formulas based on the fields etc., layout the fields and headings, shading and other design attributes and test it. I have done this by making a temporary access table and setting it as the datasource.

The actual data would eventually be in the same fields as the access table but extensively manipulated in code using  datatables, the final datatable i then needed to attach to my report template. Got it all working as follows:

1. Make temp access table and design report layout.
2. Make datatable with actual data
3. Link them




        Dim cr As New CrystalReport1
        cr.Load(clsGlobal.gsPath & "CrystalReport1.rpt")
        cr.SetDataSource(DT)
        CRV1.ReportSource = cr
        CRV1.Show()
0
 
LVL 3

Author Comment

by:JeffvClayton
ID: 17832717
managed to press submit before finishing but basically all works wihtout using xml.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month10 days, 22 hours left to enroll

770 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