Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 Number in cell is formatted as text?

Author  Topic 

chriskhan2000
Aged Yak Warrior

544 Posts

Posted - 2005-04-25 : 17:14:05
When I export my report into excel I'm getting these little green triangles at the top. When I click on it, it says "The number in this cell is formatted as text or preceded by a apostrophe". Anyone knows why it gives this error?

jhermiz

3564 Posts

Posted - 2005-04-25 : 17:17:49
It's not really an error, its excel trying to display data as text or vice versa. For instance, if you right click on this cell in excel and do formatting you should be able to tell it it is a number type field. As soon as you do that the little arrow will vanish.

Jon



Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Imperfection living for perfection --
[url]http://jhermiz.blogspot.com/[/url]
Go to Top of Page

mohdowais
Sheikh of Yak Knowledge

1456 Posts

Posted - 2005-04-26 : 06:20:11
AFAIK, this is a "feature" that was introduced in Office 2003 (or was it in 2002/XP?). You wont see these little triangles in Excel 2000. It is just intended to warn you that you have a number in a field that is formatted as a text cell.

OS
Go to Top of Page

jhermiz

3564 Posts

Posted - 2005-04-26 : 10:16:32
What is AFAIK ? I always see that ?



Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Imperfection living for perfection --
[url]http://jhermiz.blogspot.com/[/url]
Go to Top of Page

mohdowais
Sheikh of Yak Knowledge

1456 Posts

Posted - 2005-04-26 : 10:38:20
As Far As I Know ...which is not very far .


OS
Go to Top of Page

chriskhan2000
Aged Yak Warrior

544 Posts

Posted - 2005-04-26 : 11:35:44
Is there any way to format this in RS so that it does not show up when Exporting it to Excel? I'm not clear why it would do this to this particular report and not the others.
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2005-04-26 : 12:27:59
My advice -- Excel should be used as a tool for your users if they need to take data out of the reports and then "play" with it some more. i.e., cut and paste into another report, do separate analysis, add some manual formulas or calculations, or whatever. They shouldn't worry about it looking good in Excel. If they want to print the report with all the formatting exactly as it looks on the web, they should simply use the PDF format, that's what it is designed for.

Be sure to make sure that you always use the proper tools for the job. And rememebr that ANY export into any other format is at the liberty of how the application decides to present that file to the users. I.e., in Excel 2006, there might be even more little boxes or indicators or grid-lines added or changes in default number/text formatting, who knows?

- Jeff
Go to Top of Page

jhermiz

3564 Posts

Posted - 2005-04-26 : 14:12:50
Chris,

What datatypes are the fields ?

Jon



Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Imperfection living for perfection --
[url]http://jhermiz.blogspot.com/[/url]
Go to Top of Page

chriskhan2000
Aged Yak Warrior

544 Posts

Posted - 2005-04-26 : 14:41:00
Mostly VARCHAR and a couple in DECIMAL.
Go to Top of Page

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2005-04-26 : 15:44:28
Have you tried applying formatting to the report textboxes or table columns to enforce that they are numeric?

---------------------------
EmeraldCityDomains.com
Go to Top of Page

jhermiz

3564 Posts

Posted - 2005-04-26 : 16:10:01
If they are varchar and you are sending them to excel than the little popup thingy is there for a purpose. You have two options:

1)You can convert the datatypes and set your report source with the stored procedure or query which does the conversion
2)Or deal with it and have your users or what not right click and apply the correct formatting.




Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Imperfection living for perfection --
[url]http://jhermiz.blogspot.com/[/url]
Go to Top of Page

jhermiz

3564 Posts

Posted - 2005-04-26 : 16:10:48
Chris noticed you were from Wisconsin, anywhere near Janesville ?


Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Imperfection living for perfection --
[url]http://jhermiz.blogspot.com/[/url]
Go to Top of Page

chriskhan2000
Aged Yak Warrior

544 Posts

Posted - 2005-04-27 : 15:29:27
Hey Jon. I lived about almost a 3 hour drive from here to Janesville.

Jeff I agreed with you, but the users don't see eye to eye with the developer. About formatting in Excel, the problem is that when users export it to Excel, all they see are white spaces and datas. What they wanted to do is sort it in excel by columns and then print. Since exporting it to Excel only shows white spaces, it makes it hard for the user to see. I tried turning on the bordless feature hoping that it will put the bordless gray lines on the cell, but this doesn't work unless you cut or copy the entire spreadsheet and paste it to another Excel sheet.

Jon, the suggestions about giving it a gray line and .5pt border line works great for presentation. Of course this also present new problems. When user prints, they get gray cells around the data and they also complain about this.

Been getting headaches from users complaining all the time. Why can't they see it like we do and just learn to live with what they get or work around it??
Go to Top of Page

jhermiz

3564 Posts

Posted - 2005-04-27 : 22:20:50
quote:
Originally posted by chriskhan2000

Hey Jon. I lived about almost a 3 hour drive from here to Janesville.

Jeff I agreed with you, but the users don't see eye to eye with the developer. About formatting in Excel, the problem is that when users export it to Excel, all they see are white spaces and datas. What they wanted to do is sort it in excel by columns and then print. Since exporting it to Excel only shows white spaces, it makes it hard for the user to see. I tried turning on the bordless feature hoping that it will put the bordless gray lines on the cell, but this doesn't work unless you cut or copy the entire spreadsheet and paste it to another Excel sheet.

Jon, the suggestions about giving it a gray line and .5pt border line works great for presentation. Of course this also present new problems. When user prints, they get gray cells around the data and they also complain about this.

Been getting headaches from users complaining all the time. Why can't they see it like we do and just learn to live with what they get or work around it??



Cause they are jealous of your mad skills chris :).
Complaining never stops trust me. Been there done that and will still be doing that...on and on and on. People don't see eye to eye because they basically have you by their side..what I mean by this is they aren't paying an outside company to do these reports or the apps that you are creating. They have good ol' chris at their fingertips, and sometimes it's very hard to make them happy. A lot of times you need to tell a user flat out no :)..try it out once in a while. Heaven doesn't exist in software, where some people think we can magically make it appear.

Regarding the data and the borders...go real real light on the border...forgot the hex color will try to provide more info tomorrow. Make sure the data text is solid black. The only other thing you could do is increase the widths of the rows (which means more paper though which also costs more money :)).

Other than that I can't think of any other way to do this, rs is limited I know. Finally, one last thing to try is..there may be a property that tells the section to not only center / left / right justify but also a property to set where exactly the text should be placed. In word you can also find this where you can specify top, middle or bottom...seems to me you are looking for left justified alignment and middle horizontal placement.

I will try to help tomorrow (you may need to remind me).

Jon



Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Imperfection living for perfection --
[url]http://jhermiz.blogspot.com/[/url]
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2005-04-27 : 22:28:59
>>What they wanted to do is sort it in excel by columns and then print.

Why not have the report itself provide the sorting they need?




- Jeff
Go to Top of Page

chriskhan2000
Aged Yak Warrior

544 Posts

Posted - 2005-04-28 : 09:12:51
Yes that is something I can do.

Jon, way back you posted up an example to sort by headers that I started the thread. I was able to get it to work, but how did you fit 2 cells inside of another one? For insatnce you where able to create 2 cells with "ASC" and "DESC" and the a main one for Prodcut Name. Which tool object did you use for that? Is it just a table and then on the side have textbox? I had no idea what you did even though I got your report here with me.
Go to Top of Page

chriskhan2000
Aged Yak Warrior

544 Posts

Posted - 2005-04-28 : 09:44:35
Jon,

Looking at your example I wonder if it will be possible to have a group by like the sort by example that you have?
Go to Top of Page

chriskhan2000
Aged Yak Warrior

544 Posts

Posted - 2005-04-28 : 09:46:13
I saw that you are using Rectangle for the ASC and DESC...didn't notice that at first.
Go to Top of Page

chriskhan2000
Aged Yak Warrior

544 Posts

Posted - 2005-04-28 : 10:33:48
Jon,

I noticed that this seems to work only for query directly in RS, but doesn't seem to be working for stored procedure. Is there a workaround?
Go to Top of Page

jhermiz

3564 Posts

Posted - 2005-04-28 : 11:47:03
Which example, I am kind of lost :)




Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Imperfection living for perfection --
[url]http://jhermiz.blogspot.com/[/url]
Go to Top of Page

chriskhan2000
Aged Yak Warrior

544 Posts

Posted - 2005-04-28 : 15:10:43
It's about a report that you have on a blog that you sent to me relating to sorting by clicking on headers. After playing around with it, I was able to get it sort out now.
Go to Top of Page
    Next Page

- Advertisement -