Add calculated column to remote databook
			2 posts
			 • Page 1 of 1
		
	
Add calculated column to remote databook
Hi,
is it possible to create a java site calculated column in a remote databook?
Thanks
Marco
			
		is it possible to create a java site calculated column in a remote databook?
Thanks
Marco
- Davidge
- Posts: 10
- Joined: Fri Aug 28, 2020 4:28 pm
Re: Add calculated column to remote databook
Yes, it's possible to add columns which are only available in-memory. It's also possible disable write-back feature for single columns..
You have different options:
Add the column to the databook, e.g.
Use the right datatype, e.g. StringDataType, BigDecimalDataType, ...
Fill the values with a custom row calculator:
The other option is that you define a column on server-side. The advantage is that such column will be sent automatically back to the server/storage. This doesn't mean that the column will be used for database operations.
The server-code:
			
		You have different options:
Add the column to the databook, e.g.
- Code: Select all
- //before book.open();
 book.getRowDefinition().addColumnDefinition(new ColumnDefinition("MYCOL",
 new ObjectDataType()));
Use the right datatype, e.g. StringDataType, BigDecimalDataType, ...
Fill the values with a custom row calculator:
- Code: Select all
- book.setRowCalculator(IRowCalculator)
The other option is that you define a column on server-side. The advantage is that such column will be sent automatically back to the server/storage. This doesn't mean that the column will be used for database operations.
The server-code:
- Code: Select all
- storage.getMetaData().addColumnMetaData(new ColumnMetaData("MYCOL",
 BigDecimalDataType.TYPE_IDENTIFIER));
 
 storage.eventCalculateRow().addListener(...);
- 
				 
 Support@SIB
- Posts: 355
- Joined: Mon Sep 28, 2009 1:56 pm
			2 posts
			 • Page 1 of 1
		
	

