Thursday, February 28, 2008

how we can close window in IE without confirmation?

solution is very simple, just keep in mind it, probably it will help you in future.

for IE.7 and for IE.6
input type="button" value="close" onClick="window.opener='_parent'; window.close();"

Tuesday, February 19, 2008

?searchview and ?ReadViewEntries

I had a task where I should receive data from view as XML(myView?ReadViewEntries) or JSON (myView?ReadViewEntries&outputformat=json). All was well, except one problem which I didn't solve. It was case when I used ?SearchView (myView?SearchView&query) to show data.

Actually I waned to do something like this:

And as I informed it is impossible in 5-6-7 versions. Guys on IBM's forum told me that it would be added in future version (probably R8, but who know:] ) and will be like this one ?SearchViewEntries

don't forher about it.

Thursday, February 07, 2008

Decimal Separator in formula - Solution

definetly it is a simple feature, but I like such approaches, I found this one on IBM:
@Middle(@Text(@Pi); 1; 1)
but probably this one will be more easy for our brain (but it depends):
@Middle(@Text(1/10); 1; 1)

Actually the problem could be when we want to show value which are stored in 2 (or more) different fields, put them together in 1 place and split "default decimal symbol".

default decimal symbol - could be changed in Control Panel->Regional Options->Numbers tab.

Monday, February 04, 2008

View -> JSON -> Excel report

Usually I (probably as all) used agent approach in web applications for making excel's reports. In my case I was asked to make some reports exporting all data from current view (reports should look like in view).

So I decided to use another approach (in my case it was JSON because I like it more). Here you could download the demo version how to receive data from LN database.
to receive all documents from view I used:
to receive the name/title of columns I used:

and in the end of the story I used next code to create excel report

if (
xlApp = new ActiveXObject("Excel.Application");
xlBook = xlApp.Workbooks.Add();

XlSheet = xlBook.activeSheet;

XlSheet.cells(1,1).value = "value";
xlApp.visible = true;

This function works only in IE as far as I know.