Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Running Total "Sum" option is missing Post Reply Post New Topic
Author Message
row118
Newbie
Newbie


Joined: 28 May 2009
Online Status: Offline
Posts: 1
Quote row118 Replybullet Topic: Running Total "Sum" option is missing
     Posted: 28 May 2009 at 6:07pm

I'm designing a simple Crystal Report in VB/VS.NET 2005. I am using an a datatable (filled with XML)  as my datasource. I am trying to sum my Week To Date sales column. But whenever, I add "running total", to the Group Footer, I don't get "Sum" in the dropdown. I get maximum, minimum, count, distinct count, etc...everything except plain-jane "Sum". Then, when i try to add an unbound number field and do sum({ReportTable.WTDSales}), i get

"There is an error in this formula. Save it anyway?" I click no and get "A number field or a currency amount field is required here".

Here is my datatable definition:

        Dim dtOracleData As DataTable
        dtOracleData = New DataTable()
        With dtOracleData
            .Columns.Add("StoreId", GetType(String))
            .Columns.Add("WTDAllSales", GetType(Double))
            .Columns.Add("WTDGuestCount", GetType(Long))
            .Columns.Add("WTDGuestCountLY", GetType(Long))
            .Columns.Add("YTDGuestCount", GetType(Long))
            .Columns.Add("YTDGuestCountLY", GetType(Long))
            .Columns.Add("WTDCars", GetType(Long))
            .Columns.Add("WTDSeconds", GetType(Long))
            Dim keys(1) As DataColumn
            keys(0) = .Columns("StoreId")
            keys(0).Unique = True
            .TableName = "OracleData"
            .PrimaryKey = keys
        End With

 
 
I also tried to attach a schema to the XML file with the the WTD Sales fields defined as decimal. Still. no dice.

Perhaps related is when I try to insert a graph using the Chart expert, the OK button is grayed out. Is this a licensing thing?


Any idea what could be the problem?
I would like to change the world but they won't give me the source code.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 29 May 2009 at 6:27am
usually seeing a lack of aggregates; sum, average, mean etc, means that crystal sees the field as a string and not a number.
 
After you attached the schema did you refresh your datasource?  This is usually what I have to do when my data's schema changes, just refreshing the report will not do.  I usually will go to the Database/Database Expert, find my connection, right click and select Refresh.  Then I will go to Database/Verify Database.  This usually does the trick.
 
I don't use charts, so I haven't a clue, but I doubt that it is licensing.  The chart is probably thinking, I can't compare a bunch of strings, so I won't let the chart be saved.
 
HTH
 
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum