RDLC Report Totals RRS feed

  • Question

  • Hello,

    I am attemping to total a couple columns in an rdlc report I am generating. the values in the report are in decimal as soon in the screen print, however I noticed the column in my MS Access database is defined as text. 

    I am using this in the column totals for each of the columns I would like to total. =Sum(Fields!Model_Material2.Value)

    I know I am going to have to do something different with the first column since its time based, but the other 2 I'm not sure.

    The data I'm dealt is all column as text, is there a simple way in the report to convert it so it will calculate properly?



    • Moved by Youjun Tang Tuesday, December 9, 2014 5:15 AM more related to suggestion forum
    Monday, December 8, 2014 5:30 PM

All replies

  • Hi,

    The most easiest way to is change the field value from text to money to calculate properly,

    Tuesday, December 9, 2014 2:39 AM
  • Hi MW2011,

    Your problem is related to Reporter, we have a forum specilized for Reports. https://social.msdn.microsoft.com/Forums/en-US/home?forum=vsreportcontrols

    we are moving your post there for better supports. Thanks for your understanding.

    Best regards,
    Youjun Tang

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, December 9, 2014 5:14 AM
  • I changed the fields in my access database to decimal with 3 decimal places, when I import the text file I dont even get close to what I am expecting, above for example the first record is 0.239 I am expecting to import .239 now. Instead I get 0.

    For the second record above its 6.274 Instead I get 6.

    Is it rounding or something?

    This is what I am using with a normal INSERT INTO

    cmd.Parameters.AddWithValue("Model_Material2", tmp_Model_Material2) 
    cmd.Parameters.AddWithValue("Support_Material2", tmp_Support_Material2) 

    Both tmp variables are straight out of the text file with the values you see above.

    Any help getting the monkey brother off my back would be appreciated.



    Tuesday, December 9, 2014 10:05 PM
  • Hi MW,

    Expect to get 0 value if you passed the value as text you will need to convert it into a decimal or double,

    Wednesday, December 10, 2014 6:35 AM
  • Howdy,

    I did end up getting it to work perfectly by changing everything to double with 3 decimal places, now what was in the text file is added to the database and is calculated properly.


    Now onto the next column,

    How should I handle the time column in the above screen print the build duration is in minutes and seconds, I guess if it runs over 59 minutes it will reflect hhmmss.

    If I change the field type to time in the database the time gets all mucked up and does not match what was in the text file anymore.

    My brother needs the report to show the total time on the machine for a certain project.

    As Always Thanks


    • Edited by MW2011 Thursday, December 11, 2014 12:00 AM typo
    Wednesday, December 10, 2014 11:58 PM
  • Can someone help me convert my double column to hhmmss in my rdlc and total the column in my rdlc report. I'm having trouble comprehending how that is accomplished using the expression builder in the field properties.

    My field has values like:

    38.000 (38 seconds)

    313.000 (313 seconds)

    1048.000 (1048 seconds)

    I want to display each of those in hhmmss and then have the total time in hhmmss at the bottom.

    Just can't put my finger on the solution, I've searched online and haven't really found any good examples of the expression builder for converting seconds to hhmmss.




    Sunday, December 28, 2014 9:30 PM
  • I changed my field on my report to just number with no decimal places and I am getting the proper values in each record, now for the total.

    I found this online: but it does not seem to work


    I had to change it to:


    I assume [seconds] above was the users field he was calculating. I had to use Fields!Build_Duration.value without the []

    and I do no understand what the "0.000694444444" is for???



    Monday, December 29, 2014 1:32 AM