Last post Oct 16, 2012 01:51 AM by Ajay2707
Oct 15, 2012 12:09 AM|smsavsani|LINK
I have use DataTable to bind my crystal report. my DataTable contains credit & debit amount column,in which when credit amount != 0 then debit amount = 0 and vice versa. means every column contains either credit or debit information.
in my first column i want to display credit records bank name and second column displays Credit Amount and same logic for Debit amount which is displays in 3rd and 4th column.
currently my output look like below :
- HDFC Bank | 550 |(blank) | 0
- blank) | 0 | 500 | HDFc bank
here i get blank space and 0 in any section either credit or debit because i only get credit or debit amount per record so it puts 0 and blank space for other section i want to suppress(hide) this blank portion if i achieve this i will get
following output of the above list.
- HDFC Bank | 550 |(blank) | 500 |HDFc bank
so how do i achieve this?
Oct 16, 2012 01:51 AM|Ajay2707|LINK
It is good to set this value in datatable in your .cs page. So nothing to worry at report side and no headache for what will come, why not show like that.
Still if you want in report side. then take one variable and remove (blank) string like
(use mid for get substring, INSTR for search and get index )
var left_part = MID(my_string, (INSTR(my_string, "(blank)")) ));
var right_part = MID(my_string, left_part.len , (INSTR(my_string, "(blank)"))) );
return left_part + right_part;