troubleshooting Question

Display Date field in Crystal Reports.

Avatar of ScottParker
ScottParkerFlag for United States of America asked on
MySQL Server
4 Comments1 Solution778 ViewsLast Modified:
I am useing Crystal Reports that comes with Visual Studio 2003.
I am programming in VB.

following the "Using MySQL Connector/NET with Crystal Reports" guide
posted at http://dev.mysql.com/doc/mysql/en/connector-net-using-crystal.html 

I created the "XML" file with my dataset in order to then use that for the datasource of my Report.
None of the "Date" fields were avaliable in Crystal Reports......

a couple lines from the XML file that was created ...
                <xs:element name="InvoiceNum" type="xs:string" minOccurs="0" />
                <xs:element name="DueDate" msdata:DataType="MySql.Data.Types.MySqlDateTime, MySql.Data, Version=1.0.4.20163, Culture=neutral, PublicKeyToken=c5687fc88969c44d" type="xs:string" minOccurs="0" />
                <xs:element name="InvoiceDate" msdata:DataType="MySql.Data.Types.MySqlDateTime, MySql.Data, Version=1.0.4.20163, Culture=neutral, PublicKeyToken=c5687fc88969c44d" type="xs:string" minOccurs="0" />
                <xs:element name="VendorID" type="xs:int" minOccurs="0" />
                <xs:element name="DisplayName" type="xs:string" minOccurs="0" />

I tried changeing the datedue field to...
<xs:element name="DueDate" type="xs:string" minOccurs="0" />

Which then made the field avaliable to put on the report... SO I did.

I then use the following VB Code to "Run" the report.

Dim myreport As New ReportDocument
myreport.Load(app_path & "\Reports\rptInvoiceFullDetail.rpt")
myreport.SetDataSource(myDatacls.ds.Tables("report"))
myViewer.ReportSource = myreport

myDatacls.ds.Tables("report")  is a dataset that is filled in useing the same SQL statement that built the original XML file.

Everything works fine except the date fields... They are always blank...
Even though when looking in debug mode, the dataset does have values in the date fields....

Any Ideas?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros