- Home
- Forum
- ASP.NET Web Forms (Classic)
- Accounting Format in reports
Accounting Format in reports
Date: 8/25/2008 7:42:50 AM by G.YavanaArasi [Syncfusion]
Subject : Cell/Range Formatting
Hi,
In a post dated and subject as above to format a cell in accounting format like
($-) if cell value is 0 and
($7,337,216) if the cell has some real numbers,as per the post the solution to this was
Sheet1.Range(4, 3, 28, 3).NumberFormat = "_(""$""* #,##0_);_(""$""* (#,##0);_(""$""* ""-""_);_(@_)"
You can find the outcome of this expression in the attached excel file (QR.xls) and the first tab named "FCE"
I am using expression now to format a row in the same file, second tab named "notformatedto$".
Why am i not getting the row formatted like $- when the cell value is null????
I did a quick watch on the vb.net datatable row object which is fetching the above mentioned rows from the database.
If you can open the attached word doc Second page(sending in next post since i can attach only one file) has the Quick watch for the data which formats like in QR.xls
If you take a look at the value column of the datatable row it is 0D when the value was null.
First page in the attached doc is the quick watch of the data which goes to AR.xls. If you see the
value column, the null values from sql server DB has System.dbnull value
Is it because of the 0D value it formats to $- and does not format because it is System.dbnull?
Thankyou,
Vidya
QR_caef4192.zip
Subject : Cell/Range Formatting
Hi,
In a post dated and subject as above to format a cell in accounting format like
($-) if cell value is 0 and
($7,337,216) if the cell has some real numbers,as per the post the solution to this was
Sheet1.Range(4, 3, 28, 3).NumberFormat = "_(""$""* #,##0_);_(""$""* (#,##0);_(""$""* ""-""_);_(@_)"
You can find the outcome of this expression in the attached excel file (QR.xls) and the first tab named "FCE"
I am using expression now to format a row in the same file, second tab named "notformatedto$".
Why am i not getting the row formatted like $- when the cell value is null????
I did a quick watch on the vb.net datatable row object which is fetching the above mentioned rows from the database.
If you can open the attached word doc Second page(sending in next post since i can attach only one file) has the Quick watch for the data which formats like in QR.xls
If you take a look at the value column of the datatable row it is 0D when the value was null.
First page in the attached doc is the quick watch of the data which goes to AR.xls. If you see the
value column, the null values from sql server DB has System.dbnull value
Is it because of the 0D value it formats to $- and does not format because it is System.dbnull?
Thankyou,
Vidya
QR_caef4192.zip
SIGN IN To post a reply.
2 Replies
VJ
Vidya Jayakumar
November 20, 2008 03:00 AM UTC
Please ignore the AR.xls file mentioned below it replaces the secong tab in QR.xls.
Vidya
>Date: 8/25/2008 7:42:50 AM by G.YavanaArasi [Syncfusion]
Subject : Cell/Range Formatting
Hi,
In a post dated and subject as above to format a cell in accounting format like
($-) if cell value is 0 and
($7,337,216) if the cell has some real numbers,as per the post the solution to this was
Sheet1.Range(4, 3, 28, 3).NumberFormat = "_(""$""* #,##0_);_(""$""* (#,##0);_(""$""* ""-""_);_(@_)"
You can find the outcome of this expression in the attached excel file (QR.xls) and the first tab named "FCE"
I am using expression now to format a row in the same file, second tab named "notformatedto$".
Why am i not getting the row formatted like $- when the cell value is null????
I did a quick watch on the vb.net datatable row object which is fetching the above mentioned rows from the database.
If you can open the attached word doc Second page(sending in next post since i can attach only one file) has the Quick watch for the data which formats like in QR.xls
If you take a look at the value column of the datatable row it is 0D when the value was null.
First page in the attached doc is the quick watch of the data which goes to AR.xls. If you see the
value column, the null values from sql server DB has System.dbnull value
Is it because of the 0D value it formats to $- and does not format because it is System.dbnull?
Thankyou,
Vidya
QR_caef4192.zip
Vidya
>Date: 8/25/2008 7:42:50 AM by G.YavanaArasi [Syncfusion]
Subject : Cell/Range Formatting
Hi,
In a post dated and subject as above to format a cell in accounting format like
($-) if cell value is 0 and
($7,337,216) if the cell has some real numbers,as per the post the solution to this was
Sheet1.Range(4, 3, 28, 3).NumberFormat = "_(""$""* #,##0_);_(""$""* (#,##0);_(""$""* ""-""_);_(@_)"
You can find the outcome of this expression in the attached excel file (QR.xls) and the first tab named "FCE"
I am using expression now to format a row in the same file, second tab named "notformatedto$".
Why am i not getting the row formatted like $- when the cell value is null????
I did a quick watch on the vb.net datatable row object which is fetching the above mentioned rows from the database.
If you can open the attached word doc Second page(sending in next post since i can attach only one file) has the Quick watch for the data which formats like in QR.xls
If you take a look at the value column of the datatable row it is 0D when the value was null.
First page in the attached doc is the quick watch of the data which goes to AR.xls. If you see the
value column, the null values from sql server DB has System.dbnull value
Is it because of the 0D value it formats to $- and does not format because it is System.dbnull?
Thankyou,
Vidya
QR_caef4192.zip
GM
Geetha M
Syncfusion Team
November 20, 2008 06:32 AM UTC
Hi Vidya,
Yes. '$ -' does not displayed because as there is no value in the cell. This is the behavior of MS Excel. You can check this by applying the Number Format as 'Accounting'. If you type '0' then it will display as '$ -'.
Please follow up with the direct trac incident you created on this regard.
Regards,
Geetha
Yes. '$ -' does not displayed because as there is no value in the cell. This is the behavior of MS Excel. You can check this by applying the Number Format as 'Accounting'. If you type '0' then it will display as '$ -'.
Please follow up with the direct trac incident you created on this regard.
Regards,
Geetha
SIGN IN To post a reply.
- 2 Replies
- 2 Participants
-
VJ Vidya Jayakumar
- Nov 20, 2008 02:48 AM UTC
- Nov 20, 2008 06:32 AM UTC