cancel
Showing results for 
Search instead for 
Did you mean: 

Why would formatting not work at all in VB.Net?

Former Member
0 Kudos

Hi,

I have installed crystal reports and have a working report except that the formatting does not change no matter what I do.  I've changed it to currency, custom settings and default numnumericttings.  It always looks the same.  Other changes I make like fonts, or changing text works.   I'm stumped.  Any Ideas?

(I used crystal for years in VB6.  I am very familiar with how it used to work and much is the same in appearance)

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Here is some more info:

The data source for design is a field definition file.

I load a list with the results from a data reader and pass it as the recordsource.

The report is in production, but it will make 4.00 >> 4, when I want the zeros.

Then I noticed that it will not even take currency formatting. 

Answers (1)

Answers (1)

Former Member
0 Kudos

I've tried everything.  I've even reinstalled the SP4 update.  Nothing changes the format.

0 Kudos

Hi R,

Need to know what version of CR and VS you are using?

Sample code on what and how you are trying with details or even a sample report using the Xtreme.MDB file would be great.

You can add files if you use the Advanced Editor link, must be less that 1 meg and zip the file up and rename it to *.txt.

Must use RAS to make changes of this type and you will likely need to Clone the object first and make the change.

Don

Former Member
0 Kudos

I'm using VS 2010 Professional and I'm using the latest version of CR for Visual Studio 2010 on the SAP web site.    ***EDIT - I have also applied SP4 /END EDIT*****

Here is the code that loads the report:

Dim pr As List(Of pLabDataLayer.ProximateReport)

pr = ProximateDB.GetProximateReport(m_intLabIdStart, m_intLabIdEnd)

       

Dim filePath As String = My.Application.Info.DirectoryPath

Dim dset As DataSet

dset = CovertListOfToDataset(pr)


Dim rpt As New ReportDocument

filePath =

"C:\Users\*****\Documents\Visual Studio 2010\Projects\pLab\pLab"

#If DEBUG Then

        filePath = Mid(Application.StartupPath, 1, InStr(Application.StartupPath, "\bin") - 1)

#Else

        filePath = Application.StartupPath

#End If    

  rpt.Load(filePath & "\reports\rptProximate.rpt")

  rpt.SetDataSource(dset.Tables(0))


        CrystalReportViewer1.ReportSource = rpt

        CrystalReportViewer1.Refresh()

        CrystalReportViewer1.Show()

I'll put the rpt and ttx file in next post.

Former Member
0 Kudos

This is a zip file with the extension changed.   there are three files.   rpt, vb, ttx extensions

0 Kudos

Hi R,

So it would appear the issue is in the data type stripping the training zero's correct? You are not actually trying to make changes to the field object format?

This I recall is a limitation or setting of the data set. If you export the report to RPT format and then look at the field types are they all listed as strings?

I should mention also, CR's ttx drvier no longer ships or is it supported. You should use XML and the ADO Plus ( XML ) driver as your source and conver the front end export the data as an XML/XSD sorect rather than using TTX.

Don

Former Member
0 Kudos

Thanks, I working on trying to implement this.   It does recognize the ttx file, but it seems that my functionality is limited.    I really appriciate your response and have been out of town.  Just now got time to digest this.