Crystal Reports Localization - crystal-reports

We're developing an existing application with C# 2.0 and Crystal Reports for Visual Studio 2005. The problem is we want to localize the report dynamically. How to achieve it in Crystal Reports 2005?
So if the current culture is "id-ID", I want my report to display "Rp" instead of "$" , and the date format in in Indonesian format.

Assuming you're building these reports in the Report Designer, right-click on each field in question and select Format Field... . Select the date or number tab as appropriate, then click the Customise... button. Each of the properties you would need to change - thousands separator, decimals separator, currency symbol, DMY order, etc. - can be specified by clicking the formula button for that property, and entering an appropriate formula.
Obviously, you will need to have some way for Crystal to determine that the current culture is eg. "id-ID" - I suggest that this should be by passing the culture value to the report as a parameter. (An alternative would be to include a culture column in the report's datasets, but this would leave the culture undefined for datasets with 0 records.)
I think it should be possible to automate all of this through the API.

Related

Is there a better way to format this date field in Crystal Reports? Im having trouble with a scheduling program and getting the correct data

I have a program that runs reports on a schedule. For some reason the data it pulls is not the same as what Crystal Reports pulls. I was told it has to do with the way that the PO Enter Date field is formatted. It pulls fine from Crystal Reports but the scheduler shows different data. Im not sure where to go from here.
'''
(IF(LENGTH(TOTEXT({POP.PODADD}))=9)
THEN (DateSerial ((TONUMBER("20"+Mid
(Totext({POP.PODADD}),4,2))),
(TONUMBER(LEFT(TOTEXT({POP.PODADD}),1))),
(TONUMBER(MID(TOTEXT({POP.PODADD}),2,2)))))
ELSE (DateSerial ((TONUMBER("20"+Mid
(Totext({POP.PODADD}),5,2))),
(TONUMBER(LEFT(TOTEXT({POP.PODADD}),2))),
(TONUMBER(MID(TOTEXT({POP.PODADD}),3,2))))))
'''
The Crystal Runtime doesn't always "follow" custom formatting defined in Crystal Designer.
If you need a specific formatting, convert the date to formatted text using a formula such as:
ToText({POP.PODADD}, 'yyyyMMdd')
The 2nd argument gives you control over the desired formatting.

Set Default Current date in parameter fields Crystal Report

I have a problem with Crytal Report (CR) 2013, my customer want to default current date in parameter fields in Crytal Report when they open it. I try to do it with many ways but it not work. i'm looking forward to ur help. Tks all.
Current form
The only way I know to set a current date to a report parameter is by adding your report as a subreport and passing a formula returning current date as a source for the parameter. You may add also a parameter for date in the main report and inside the formula check if the provided value is for example 1/1/1900 then use current date. This will work if you do not have subreports in your report ( Crystal does not support nested subreports) and the user should be aware that date 1/1/1900 should be selected for current date.
Generally speaking default values should be handled by the software , which is running the report. Ask your customer to try application like this one: http://www.r-tag.com/Pages/CommunityEdition.aspx.
I am posting the link because this software is free. My guess is that there are other applications , which are able to set default values for report parameters. You can do your research. Here is a sample video setting a default value for date: http://www.r-tag.com/Pages/Preview_ParameterTemplates.aspx
The video is for different report type, but Crystal reports will be handled in the same way.
I am a colleage of Hai Pham. I give you more information about this issue.
1. datasource: stored procedure
2. set current date is default value in import parameters popup
popup image
3. users can select another value
Thanks,
Dai Nguyen Quang.

Crystal Reports Subreport - Selecting data based on column clicked

I have a number of reports with current and ytd columns(summary totals by salesman). I want to be able to select the sub-report based on the column clicked. I have one sql procedure that selects current and one that selects ytd. I want to use the same report format (without having to copy and modify it) for current and ytd. Is there anyway of identifying what column is clicked?
Crystal Reports is pretty much just a reporting tool; it's not very interactive.
I'm more familiar with older versions of Crystal Reports, but as far as I know there aren't any onClick methods for columns that can be trapped using pure Crystal Reports.
Depending on how many columns you have, you can create a subreport for each column, but that may be prohibitively slow if you have a large number of columns you want to create subreports for.
If you're using C# or VB.NET to generate the report, you may have more options, but since the question isn't tagged with any programming languages, I'm going to assume this is pure Crystal Reports.

Date format on input control

I'm using iReport 4.6.0 and JasperReports Server 4.5.0. I've created a report where I want to pass a date value to a MySQL database. I've created a parameter and used java.util.Date class. On the input control, I set it to a single value type, and the date data type. When running the report in iReport (using Preview), I'm prompted to select a date, and it generates the report using the specified date. After deploying the report to the JasperReports Server, when I'm prompted to enter a date, I get an empty report. I noticed the date format is different on the input control on the server (YYYY-MM-DD) than the one when previewing the report in iReport (MM/DD/YYYY). Is there any way to fix this?
I agree with mdahlman. The formatting of the input control shouldn't be a problem. It should be passing a valid date value to the report.
Make sure that the name of the input control (not the label) exactly matches the name of your parameter. And it is case sensitive. If they are not identical, this could be your problem.

Crystal Report - Placing decimal point

I'm getting an integer value as 2345 but I want to display it as 234.5
is it possible??
To get what you are looking for in a simple fix is like what kingpin stated above. Divide the value by ten. To do this just create a new formula in crystal by going into your field explorer and right clicking on the formula fields section. Under there should be a option to create a new formula. Then in window that comes up put the field you want to manipulate in the formula and then divide that by ten. And there you go. Now use the formula field in the report instead of the original field.
Here is a example of how it could look.
{Table_Foo.value_Bar} / 10
There is a field property for it. Don't have access to crystal reports at the moment, but I know it's there:
Crystal Report Provides an easy to use default thousand separator for numeric Fields. You can use it by checking Thousand Separator from Field Properties.
If you need a customized separator, check Customized Thousand Separator in Crystal Report.
You also might want to find some tutorials on the Crystal Reports themselves if you still have trouble.