Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

VB.NET Crystal Report Designer

Posted on 2006-10-27
3
Medium Priority
?
511 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying 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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

604 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