Visual Studio 2005For discussing Visual Studio 2005. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Visual Studio 2005 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
Visual Studio 2005 export to Excel Issue with formatting
Hi Everyone-
I am having a tricky issue I have not run into before. I have designed a report in Visual Studio with numerous matrix's in it. In the very last cloumn of every matrix I have an "IIF" statement in a cell. An example of the Iif statment is:
This same statement is over and over again in the other matrix's last cell to the right, except the textbox values are different since "reportitems!textbox255.Value" obviously isn't in every matrix so it would have to be changed to accomodate. (EX: reportitems!textbox311.Value...and so on..)
I had selected the properties of the cell and set the format code to "P" (for percentage) for all these and double checked to make sure and they all are and they are still all set up to show percentages .
When I preview the report in Visual Studio all show as percentages...like they are supposed to. When I export to a PDF they also still all show as percentages too. The problem is when I export to excel, some of them are not showing up as percentages, but rather showing up as decimals. For example one of these matrix's will show the amounts with a percentage format like "100%" while the other matrix will show it as a decimal like .1 with no percentage sign.
All the matrix's have the exact same formatting and are showing fine in PDF form and in the preview in Visual Studio, so why is excel showing some matrix's values in percentages, and some of the matrix's in decimals.