crystal report from dataset in c# has a lot of spaces on string fields - crystal-reports

when creating crystal report from dataset in c# , some times the data in string fields appears not aligned and it seems have a lot of spaces before the text value .
please how can I remove all this spaces ?

you can use Trim function.
Trim(String database field)

Related

Crystal Reports. How to to extract only numbers before hyphen

We have a number field in our Database called" {PO_TEMP_PO_HEADER.PO_Number}that contains numbers in the following format:
5418-4
1247-2
9134-1
I only want to display the numbers before the hyphen
5418
1247
9134
How do I do this in Crystal Reports?
I tried various formulas I found online but it always resulted in an error when saving in Crystal.
Split({your.db_column}, "-")[1];
This splits your column into an array and returns the 1st element.

Crystal Reports not show numbers just blank field from XLS data source

I try to make a CR report from excel file. But the number fields are blank in CR (Like 97007244). If i put the cell one letter (Like X97007244), CR shows the field.
I tried to change cell type to text, but still not show.
What can I do?
Thanks!
The report probably assigned incorrect data type to that column.
Try to do Database, Verify Database...

Crystal Reports Export to .csv comma delimited string inserting blank columns

I have a issue and need some expert help! I'm trying to export a .csv field directly from crystal reports and I keep getting blank columns in between my datasets. The report is one formula only in the details section, that contains a string separated by comma's like below. Any help or suggestions is greatly appreciated!
*Side note the requirements are an export directly to .csv so no export to data only then save to .csv will work.
Your approach implicitly converts numbers to text. This might results in extra commas due to thousand separators.
Instead, use explicit conversion such as
ToText({your number}, 2, "")
to avoid the extra commas.

numeric fields added with single quote in jasper generated excel file

I'm designing a jasper report with the field type & text field type as double.
When run the jrxml file using jasperreports4.7.jar for excel format,
it'll add a single quote in numeric columns.
so i can't do any numeric manipulation in excel.but same is working fine in jasperreports3.jar.
is anyone facing the same issue?
pls help me
What you need to do is to define the field you want to print as an Integer or Double. (You must set your Report to java)
If I do not know yet what type of field is comming I am making, lets say 3 fields, one String, one Integer, one Double. Then I pass the info the what it is dynamically to another -meta-field.
In the designer I lay all 3 fields over each other. Seems to work.

How do I parse a field in Crystal Reports that uses a record separator

Crystal Reports XI, SQL Server 2008. I have a varchar column that uses a record separator to divide items but it disappears when it's rendered in Crystal Reports.
When I check the results in an editor I see that it's recognized as either RS or in Hex 1E. I would like to convert the RS to a comma if possible but anything that breaks it up would work.
Example Item oneRSItem TwoRSItem Three becomes Item OneItem TwoItem Three. I would like to have Item One, Item Two, Item Three.
Here's what I ended up doing which solved my issue. I determined that the record separator was CHAR(30) (using this table) and used that function in REPLACE(table.Value, CHAR(30), ', ') and it worked.