As shown in the images below sometimes the rows are truncated/split beteween two pages of my report.
Is there any property I can set on DevExpress XtraReport to avoid it?
Details:
The DetailBand contains 3 fields and is inside a subreport (it's a 2 columns/subreport).
The subreport is printed inside a GroupHeader in the MainReport.
The truncated text reads (in 3 columns):
343
HONORÁRIOS - FREE LANCERS
R$ 2.126,42
Happened I found the issue.
My databands all have the flag KeepTogether set to true but labels also have that flag (default false).
I flipped the flag to true in all labels in the report and it worked
Related
I have been trying to load Sybase ASE query data into a text file. The text file data is going to be loaded into a Postgres table.
But many rows are sent as 2 separate rows to the output file. The output in isql itself has this issue.
I have tried the below options still no success.
Tried ltrim(rtrim(cast(column_name as varchar))) -- tried for all columns in the query.
Tried sed to streamline the output format
Tried different column widths, delimiters etc. in the isql connection.
None of the above steps fixes my issue.
Below is a part of the query output with the above said issue.
3240 1MB MGMT AB -8377 NULL LEGACY PASSED
3240 1MB MGMT AB -8377 D22600484
DISCONNECT DISCONNECT
The above query result has 2 rows(first column has the value 3240 in both the rows)
As you see, the 'DISCONNECT DISCONNECT' part in the second row comes to the next line and this is treated as 3rd row. The datatype of the last 2 columns are varchar(10), so there is no space issue seemingly.
There is no space before or after the column values either.
Please let me know if there is any way to overcome this issue.
As #Shelter suggested have a look at the -w option for isql. It controls the width of the output from isql. Provided -w is wider than any of the rows, every row will appear all on one line.
You may also want to remove other extraneous stuff:
Column headings
Row count
Column headings can be removed with the -b option.
The row count can be removed with the option
set nocount on
go
in your SQL script.
Another alternative is to create a view using the SQL used to create a view and use the BCP tool to export the data in character format.
Answer to a similar question on StackOverflow.
I am using the XRRichText.visible=off if there is no data, but still it throwing some spaces in report. I do not want those spaces if there is no data.
Just want to display none & no spaces . How can I do this?
The upper spaces are just XRRichText.
Set the property ProcessNullValues for the labels with the issue as ‘Suppress and Shrink’.
The purpose of this property value is: If a control receives a null value, it is not printed (without adding blank space in its place).
The property has two more values:
Leave – A control is always printed.
Suppress - If a control receives a null value, a blank space is printed instead.
Disclaimer: I am a Cognos newbie.
I want to format a data item in Cognos (Report Studio 10.2) to always display as 2 digits. For example, if the value of the data item in 2, I want it to be displayed as 02. How can I achieve this?
I have tried
Format$([my_data_item], "00")
Format([my_data_item], '00') - w/o the dollar sign
None worked.
Any help will be highly appreciated. Thanks!
Marcus ...thanks for pointing me in the right direction.
I was able to use the round function in the query with a CASE statement and it served my purpose with very little modification to the original report. Note to any new Cognos developer would be leave formatting to the report page and not the query.
case when [TRANSFORMATION VIEW].[SOME_FACT].[DOLLAR_VAL]<>-99999 then
case when [TRANSFORMATION VIEW].[SOME_FACT].[DOLLAR_VAL] >= 1000000 then
round( [TRANSFORMATION VIEW].[SOME_FACT].[DOLLAR_VAL] /1000000, 2)
else
round([TRANSFORMATION VIEW].[SOME_FACT].[DOLLAR_VAL],0)
end
end
Then on the report itself, I formatted the data item as Numeric and didn't change any of the default settings. That did the magic. The reason why I have round([TRANSFORMATION VIEW].[SOME_FACT].[DOLLAR_VAL],0) is because I don't want to display cents in the dollar amount.
I want to change these values with DataFormatString properties in Gridview.
1.000000 --> 1 --> Deleting all digits after .
366705.000000 --> 366,705 --> Deleting all digits after . and put the comma for seperate.
12.830000 --> %12,83 --> Delete last 4 digits after . and put % (% is optinal not must)
BTW, Is there any link to suggest me otherwise DataFormatString. I analyze very well this page but sometimes still can't find what I need about data format string.
Here you go. I didn't test #3 - if it's not right, it's close.
1
Convert the number to an int.
2
String.Format("{0:n"}, 366705);
3
(12.83 / 100).ToString("{%#0.00}", el-GR);
A couple helpful formatting web pages:
Custom Numeric Formatting
SteveX Compiled - blog with many samples
I have a crystal report with several columns.i need to hide a column and remove the blank space based on a condition.currently what i have done is.i have dragged and dropped the fields inside TextObject and tick the "Suppress Embedded Blank Field Lines" and "Can Grow".it'll hide the detail field and also remove the blank space but the issue is header is still visible.
condition to hide a column is if the field data is null or empty
Try creating a formula for your conditionally displaying column heading. Something like:
SomeFieldLabel:
If DistinctCount({#SomeField}) > 0 Then "The Column Label"
or
If Not IsNull({#SomeField}) And {#SomeField} <> "" Then "The Column Label"
Then create a text object with {#SomeFieldLabel} and all your other labels, and select Suppress Embedded Blank Field Lines.
You may need to experiment to find the right condition – one which evaluates to True whenever the field is present in your detail records, and False the rest of the time.