How to reduce the row size when the multi line data is removed from Jface Tvaleviewer - jface

Using OwnerDrawLabelProvider() I am creating a multi-line table cells, so all rows are now of same size, if I delete a multiline cell and reload the table contents , all the rows still have the size of multiline row . When I close and open my application window the row size changes to single row. Without reopening the the window, how can I achieve this ?
I tried using viewer.setInput(null) and then viewer.setInput(data) it still behaves the same.

Unfortunately this is not possible. Eclipse bug 130024 describes this. It doesn't look like this will be fixed.

Related

SQL Divides the data into 2 after Dot Issue

I have a table which I update using a stored procedure. One column is for the image Url. The code in the stored procedure looks like:
UPDATE Products
SET ImageUrl = 'https://images.XXXXXXX.com/lm/image/s/'+RIGHT(Source,2)+'/'+Source+'_'+Code+'.203'
I need the url to be in a single line in the cell however, it splits the url right before .203 when writing it into the cell. So, in the cell, it is like;
https://images.XXXX.com/lm/image/s/ab/g671235_12312
.203
It normally is no problem for me but I use this data in XML. And Since the Url is not in one line, the remote server I connect does not update the image when I submit the XML. When I manually fix the Url and put it in one line, it just works fine. I googled and searched to find a way to fix this issue, but I could not find a solution. Any help will be appreciated.
Thanks
It sounds like there is a carriage return/newline feed captured within your "Code" column. I have encountered this many times when users manually fiddle with values (they update the value and then hit thinking this will apply the value when this is just inserting the r\n\ values within the column).
To double check if this is the case:
Locate the value that is causing this line break to appear
Copy that cell value (I assume you are using SSMS)
Open Notepad++, Sublime, or similar editor that will display non-printable characters
Set your editor to display non-printable characters (in Notepad++ it is View > Show Symbols > Show All Characters)
This should then display the line break characters that are causing your headaches
Quick solution: Scrub \r\n values - https://stackoverflow.com/a/951705/8026186
More Ideal Solution Prevention of \n\r insertion
If you have access to the data being entered in the database, the best way to avoid this is to prevent the \r\n from making it into the cell in the first place. The quick solution will work in case you don't have the leverage to control initial input. However, from past experience, you will want to avoid non-printable values from appearing in the first place.
Hope this helps!

Is there a way to reduce gap between two column headings in DB2

I am working on IBM I series VR7, and running SQL(DB2) using CLLE.
I have a SQL procedure in a TXT file, having below command to create a table in QTEMP.
create table qtemp.FILE1 as (
select
Field1,Field2,Field3,.....Field10 from FILE2 ) with data;
I am calling the above procedure from CLLE using below command.
RUNSQLSTM SRCFILE(MyLib/MySrc) SRCMBR(Proc_txt) COMMIT(*NONE)
And then running below command to generate the spool.
RUNQRY QRYFILE((FILE1)) OUTTYPE(*PRINTER) OUTFORM(*DETAIL) FORMSIZE(60 132)
FORMTYPE(*STD) COPIES(1) LINESPACE(1)
The issue I am facing is that I am getting 2 white spaces between columns while creating the table using the create table command. When that table is converted into a spool file using above RUNQRY command, the fields on the right side truncates as my report width is 132 by default and I can not change it.
If the white spaces in the table created can be reduced to 1, my issue will be resolved.
The SQL I am using IBM i Series' default and DB2 as database. I don't have much idea about their version.
Edit2: Another issue I had was of report having a field in second line. Actually as per requirement a field had to be in the second row under another field. For example I needed field10 under field5. I have fixed it too, read my answer below.
Hope it helps people in need but I really doubt.
Edit1: I have updated the question as requested. Any help would be much appreciated. Thanks.
The short answer is that yes you can define the report to have 1 space between columns, but you have to define the Query400 object to do that. Unfortunately this is not a good place to write a tutorial for Query400. I can get you started though.
Type wrkqry, press enter.
Then put the cursor on the query name field, and press F4. You are now in the tool. You need to create a new query, and define everything about it in this tool. Play around with it, and see if that helps you.
I was able to get what I needed. As others have suggested, I have finally used WRKQRY to control the column spacing. Reduced the column spacing to 1 and was able to get the columns needed in the 132 width.
Another issue I had was of report having a field in second line. Actually as per requirement a field had to be in the second row under another field. For example I needed field10 under field5. So what I did was, I used the Line wrapping feature available in WRKQRY.
How I did:
Create a WRKQRY object and select the file needed.
Sequenced the field I needed in second line, to the bottom.
Go to Select Output Type and Output Form and take Y on Line Wrapping field. Put the
wrapping width equal to your report width. Leave other fields as required.
This way each record will have 10th field in next row, if it has data. You can add as
many as fields.
You may have to add some white spaces to the field for proper alignment. I would
suggest to create a new field and use concat(||) operator available in WRKQRY.
Thanks everyone for helping.

Is there a (creative) way to hide a text field in Indesign if there is no information in the data merge field?

I am creating a data-merge document in InDesign.
There are various tables that I've created which only show as many rows as there is actual data in the field, through some creative table and cell styles.
Now I've been asked to only have an entirely separate table only show if there is information in any of those fields.
I'm at a total loss. With the way the current structure is set up, I can cause it to not display any text, but it still shows empty header cells and one line of empty row cells.
Pre-DataMerge, with the data fields
Post-Datamerge, with the resulting empty cells
Any creative ideas to hide that table? I was thinking there might be a way to hide the entire text field, if not the table. Maybe a script? I tried one that deletes blank tables, but that didn't seem to work after the data-merge was run.
I am not sure you can get that level of processing with InDesign datamerge. You could think of a script to post remove those tables or use a dedicated plugin such as Easycatalog that can take care of such empty items natively.

0 Width column still showing up in Copied Data

I have a custom column at the start of my gantt view, this column somehow got shrunk to 0px. When I copy data to excel, the data still shows up. I cannot figure out how to make that column have a width. If I try to add the column again, when I copy to excel it is there twice. What can I do?
Go to Task-> View (Drop Down)-> Reset to default
This should bring all your columns back to a finite widt

How to make rows invisible while printing reports?

I am using an .rldc file to define the layout of the reports from my program. The problem is, it is to be used for incremental printing. That means the paper will be used over and over as newer rows need to be printed. I'm attempting to approach it this way:
List all corresponding data on the report view.
Make the older rows invisible and only show the latest row.
Print.
That way, the last row is already properly placed. The problem is, I don't know how to implement this. Can anyone help me out?
You could create an IIF(condition,true,false) statement in your report definition on the row visibility variable.
The best way i guess is to define in your data source something of a rank column.
example :
select col1,col2,col3,RANK() OVER (ORDER BY col3 DESC) AS 'rank' from table1
Then in your table or matrix, you click on the row or/and column that you want to make the borders and text white based on a expression.
Go to the properties and dropdown on bordercolor
choose expression and type in (based on my example query)
=IIf(rank.value <> max(rank.value),White,Black)
That will not remove the rows only make the borders white ( unvisible)
The same you can do with Font Color property.
I think this is your best shot at this issue.
Other solution I could think of is to just hide unneccesary rows (which also replaces the visible row)
Then to move the table down by using a expression with a formula like nr of rows hidden before the actual row * height of 1 row, only I m not sure if this is applicable without programming an RDL extension..
Good Luck !