Report Format

  • Hello

    I have created a query using T-SQL, to generate a result set for a report. When I execute this query in SSMS, i get the right result format for money (6,2) e.g. £2.12, but when I use that same query in BID's SSRS, i get a different money format of (6,7) e.g. £2.1234567, which is not what I want, can anyone help?

  • I have created a query using T-SQL, to generate a result set for a report. When I execute this query in SSMS, i get the right result format for money (6,2) e.g. £2.12, but when I use that same query in BID's SSRS, i get a different money format of (6,7) e.g. £2.1234567, which is not what I want, can anyone help?

    Is the query doing anything with the column?

    What is the format of the column in the table?

    Regards,

    Nigel West
    UK

  • The query actually adds the the £ symbol in front of the figures, and the data type format of the column is money

  • Not sure how you're adding the £ symbol in there, but try doing something like

    CAST(MoneyColumn AS Decimal(6,2) to ensure the value is coming to two decimal places.

    Regards,

    Nigel West
    UK

  • Hi B_boy,

    Use following format in ReportItem:- £#,##0.00

  • It may sound a bit naive, but where is the ReportItem?

  • Hey,

    Report Item means any control like TextBox in which you want the required format.

    IF this is text box then go to the property window of TextBox and just type £#,##0.00 in format property.

  • Thanks Hari

    You saved my day, better to have it done this way than using all that CAST and CONVERT syntax in the query

  • Pleased to help you 🙂

  • I have another problem with the order by syntax, in my query the order date is in DESC order, but when i preview it in SSRS, it appears the in ASC order, can anyone tell me why and how to correct it to the required display format?

  • Have you changed the Data Type of Date Field some where?

    If yes then cast it into DateTime and then apply the ORDER BY

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply