Format a string to display only 3 last characters and others as asterisks in RDLC - rdlc

I have a requirement where I need to display account number in RDLC such that it displays last 3 characters and all other characters are displayed as '*'. for eg 1234567 needs to be displayed as ****567. I'm passing in dataset containing account number to the RDLC and need to write an expression which will format account number to display 3 last digits and all preceding characters as"*". Can anyone help me with the expression writing for it? I'm very new to writing expression on RDLC.

I figured it out.... I wrote code to format account no with asterisks and called the method in RDLC expression.

Related

Remove leading zeros in Access

I am working on this project. The user will need to scan in two barcodes. The first barcode will initiate a lookup to populate a few fields in the report, and the second barcode is simply populated to the report.
My problem is both barcodes have leading zeros in them and if I included the zeros in the report, there would not be enough space on the report.
The first barcode consists of the following possibilities: 1. pure numbers with leading zeros 2. alpha-numeric combo without any leading zeros
The second barcode always has 5 leading zeros with it.
Anyone knows how I can only show the information on the report without any leading zeros?
Thanks in advance
The first barcode you should leave, text as it is.
The second, if numeric, you can strip for leading zeroes this way:
StrippedBarcode = CStr(Val(ScannedBarcode))

SSRS report that outputs the number of invoiced lines with a group by

I've never used SSRS before so I'm not too familiar with its capabilities. I need to make a report that is grouped by Division Code, and then counts the number of invoices that are the same (by Invoice Number), and displays that in a column (I called it Invoice Lines). I'm trying to get something that looks like this:
And this is what I have so far, I know that the Invoice Lines value should be an expression, though I am not sure what expression to use or how to get it to work. When I created the report, I put all the fields in the details section and the Division Code in the group by section using the report wizard, but I'm not sure if that's right either as its not displaying anything when previewed:
Image added of trying count expression from comment:
If you have grouped it by invoice number, then just an =count(Fields!Invoice_no.Value) should do the trick. Just ensure that this expression is on the grouped column header and not on the details line itself.

Allowing more than 15 digits shown in excel

i am working on a simple vba excel script. i have encountered some problems as i have removed the number's scientific format using this way
Columns("b:ad").NumberFormat = "0"
But then i realised that one of the columns is having 23 digits which is longer than 15digits as i need to display all exact 23 digits in excel(I do know the limitations of excel just for 15 digits). example, 23 digits need to be shown is 32097459000000000209640 but the field currently shows 32097459000000000000000. (FYI,i only need 000000000209640)
Any Ideas?

Crystal Report using between but only 1 parameter is showing when Entering date values

I have a formula in crystal reports that uses a year period to select its date range.
I want to edit it to bring back a range rather than just a single period.
However it is not giving me the option when entering values to give two parameters.
Current Code:
{PDP_ACC_PERIODS__.ACC_PERIOD} in {?ACC_PERIOD} to {?ACC_PERIOD}
But there is only one box to enter this, not two (as in from and too).
Added an identical parameter called ACC_PERIOD2 that looks at the same field, then added it in the selection expert as.
ACC_PERIOD
is between {?ACC_PERIOD}
{?ACC_PERIOD2}

Excel Stripping off Leading Zeros in a View

I have a SQL Server view I'm pulling into an excel macro workbook. However, one of the date fields is being treated as a number by excel and it's leading 0 is subsequently being stripped off. Is there a datatype I can convert my date field to in SQL so that excel does not strip off it's leading zero when the view is imported into the workbook?
How are you pulling the data in? AFAIK there's no Excel-wide setting to keep the leading zeros, however there are ways to keep them, or to add them back:
From Microsoft
If you're using the import wizard,
Convert the number to text when you import text data
In Step 3 of the Text Import Wizard (On the Data tab, in the Get
External Data group, click From Text), you can select the column of
data that contains the credit card number, and then explicitly choose
a Text column data format.
Alternatively, if you already imported the data and there's a pattern/structure to it, you can create a custom format:
Use a custom format to keep the leading zeros
If you want to resolve the issue just within the workbook because it's
not used by other programs as a data source, you can use a custom or a
special format to keep the leading zeros. This works for number codes
that contain fewer than 16 digits,
In addition, you can separate some of the digits in your number codes
with dashes by adding these dashes to the custom format. For example,
to make a phone number more readable, you can add a dash between the
international code, the country/region code, the area code, the
prefix, and the last few numbers.
Edit: I'm not to keen on SQL, so can only offer more Excel focused ideas :/