SSRS currency not showing as CAD - ssrs-2008

Need to show the SSRS currency as CAD 200,000.00 but not able to achieve the same.
Changed the text box properties to Custom and Format as "C".
If the language is passed "en-US" or "en-CA" the format remains the same i.e. $200,000.00. Please Help!

Pretty easy to fix if you did a bit of research. I have an option that should work for you. First, you can set the textbox value as an expression and simply add the CAD to the front of the value. Then, you'll need to format the field as a decimal using the FORMAT function.
="CAD " & FORMAT(Fields!myField.Value, "###,###.##")
This expression should fill your needs.
Edit based on comment: After a very quick Google search, I found that you cannot avoid some form of hard coding if you intend to pass the currency format based on a report language. You'll need to include the following expression:
=FORMAT(Fields!myField.Value, "c")
This will format the field as a currency. In order to have the language passed from the report language, you need to turn on advanced mode. Below, step 1 shows where to turn on advanced mode. Step 2 shows where to change the language of the report. This is the report properties which are accessed when clicking anywhere outside of the report in the report window.
Here I tried it with CA-fr.

Related

Find/Replace AMPScript

Is there a method to Find/Replace using AMPScript? I want to use AMPScript to search through an email to find sections of copy and replace them with alternative copy. I have been using the REPLACE() function but I have been unable to use it in this manner. Its requiring that I have a variable and that variable is then used through %%=v(#var)=%% to output when rendering the email. But it does not search the email body for the appropriate copy. 
This is one part of a larger project that uses the Sales Console to at first display the copy and then trying to using this functionality in Content Builder to change copy. 
​​​​​​​If anyone has any suggestions it would be appreciated as Im going in circles looking for solutions.  

Crystal Reports 8.5 Formula Definition Location?

How do you to edit a formula that is not a formula field? I can pick them in the foruma editor dropdown but that does not change the entry in the dropdown or code below.
I have a report I need to pull the logic from. The display clearly shows many #formula output fields and I can view the logic behind them. Some of the formulas reference other formulas that I can not find the definition of.
In formula editor for field: #field1
StringVar item:={table1.column1};
if item = 1 then
{#column2transformed}
else
" "
Where is {#column2transformed} defined if not on the main report display? I can find it in the selection list with an "X.1" icon next to it. I know which database field it is referencing in this simple example but can not afford to make assumptions about how the data is transformed.
In Crystal Reports formulas {#something} indicates a reference to a Formula Field that has the name of something.
The # symbol is used to signify the field name used in the braces is a Formula Field. There are other symbols used for other types of fields as well.
? is used for Parameter Fields
# is used for Running Total Fields
# is used for Formula Fields
% is used for SQL Expression Fields
I would also recommend you name your Formula Fields more descriptively. Names such as #something and #Field1 can become very confusing in the long-run. Especially in discussions such as this where it isn't always apparent if the word used is a literal name or generalized expression.
The file I was working with was version 7, I was editing with version 8.5, using version 9 fixed this bug/issue.

t's changed to "ti" when exporting to PDF

My Crystal report generates this text:
This is to certify that {FullName} has completed the course
where the formula {Fullname} is: Mr. + Name
I want to change {FullName} to remove the title "Mr". I used Find in Formulas on {FullName} and changed the Display String from Mr. + {?FullName} to {?FullName}. But somehow this replaced every lowercase "t" with "ti". So now the static string is changed to:
This is tio certify tihati .... has successfully completied tihe course
How can I correct this? A key note is that this only happens when exporting to PDF. In the Main Report Preview, the report displays correctly.
What you're describing is a really weird bug involving the Calibri font. Certain glyphs aren't handled correctly when exporting to PDF. The solutions I've found are as follows:
A) Avoid using Calibri fonts in Crystal Reports. You might try a more
common True Type font, such as Arial. Again, be sure that font is
installed on every... workstation.
or
B) Downgrade Crystal Reports to use a legacy Microsoft Uniscribe
component (USP10.dll). Here’s the procedure that we’ve used at
Alterity with good results.
Here are advanced instructions for Solution B, but I'd just recommend changing fonts. I'm sure you can find one very close to Calibri without this issue.

Does anyone know how to modify the document autoformat feature in MS Word?

I'm trying to automate applying a format to a document in Word. The Autoformat dialog has three options for Document Type: General Document; Letter; Email. I had thought that I could create a template based on the document type, but I can't find much documentation on this feature and a search of the Word folders doesn't turn up anything promising. Can anyone shed any light on this?
Thanks
Since this is StackOverflow (=programming) I'm going to assume you're looking for a way to access this via VBA (a macro). The AutoFormat "type" is set using the Document.Kind object, which takes a member of the WdDocumentKind Enum:
wdDocumentEmail 2 E-mail format.
wdDocumentLetter 1 Letter format.
wdDocumentNotSpecified 0 No format specified.
Recording a macro while applying AutoFormat gives code like this:
Selection.Document.Kind = wdDocumentLetter
Selection.Range.AutoFormat
It's not very clear to me why you'd want to use AutoFormat when setting up a template. Usually, when people take the trouble to use a template they also define a set of styles and a UI for people to use the styles...

Is there a way to detect when a field mark with 'can grow' has truncated the field data?

I do not normally work with crystal, but I have spent nearly 2 days looking for a way to do this.
The problem is that I have a number of lines of text that need to show on a report, but need to cut off after 8 lines and show a 'more' prompt to inform the user that they need to go look at the rest of the details online. This was originally handled by storing the data as individual lines already wrap to size and counting the lines with a formula and conditionally showing a separate 'more' field. They have since added the ability to use html to the text, but this made the current way of doing things wrap incorrectly and show the html mark up.
I wrote a database function to combine the text into a single field and use the HTML text interpretation to display it correctly on 7 other reports that do not limit the text length, and the max line count works great for limiting the text size, I just can't figure out how to show the 'more' prompt when needed.
Any suggestions would be greatly appreciated.
GrumpyGeek,
If your database function now combines the text into a single field does this mean the original way, with the separated lines, is still stored? If so, why not add another calculated field called 'line-count' that tallies the old line-based data?
So you'd still have your new combined HTML field and this new field that you could use to show the 'more' button when 'line-count > x'?
Alternatively, another option might work, but would be a bit touchy. That is to make the formula that shows the more button trigger when the field length exceeds x. The catch is that html mark-up isn't displayed, and heavy use of it would skew the amount of text required before you should show the 'more' button. Put another way, a field with very heavy use of mark-up ( and tags) might force the 'more' button earlier than it should. Unless you could somehow make either your 'line-count' calculated field exclude the mark-up OR make the length calculation do the same.
This would be possible if MSSQL or Crystal Reports could run regex to strip the mark-up.
If NONE of the above works, the only other thing I can suggest is to look into UDFs. Crystal allows you to load an external library that you write. These will read functions you write and show them in the function list inside Crystal. If you do this, then you could easily write a routine that strips the HTML and calculates when the more button should be shown.
Good luck with it.
Ideally, there would be a property of the DB field that would return its displayed line count. Unfortunately, there is no such property.
You could try counting the # of line ending characters (e.g. carriage return, line feed). If they are > 7 then show the hyperlink. In a HTML situation, you have to count ending elements (e.g. ). You could make use of a RegEx UFL to make it easier to identify the elements.
Probably the easiest route is to the DB to calculate the # of lines and return that as another field. Use this field to hide/show the hyperlink.