You are currently browsing all posts tagged with datawindow

PowerBuilder Bug – Autosize height and font color

Posted on August 13, 2010 at 8:20 pm in

This bug occurs in version 11.5.1 Build 4608. I’m not sure of other versions at this point. One of the many great features of the datawindow is the ability to create expressions on various object properties. This can greatly reduce coding for ‘eye candy’ type stuff throughout an application. A very common use is to…

PowerBuilder Bug – Autosize height and font color - the full story »

PowerBuilder ‘Gotcha’ – Datawindow Find method

Posted on August 6, 2010 at 8:20 pm in

The find method on the datawindow is a very useful tool but you should always remember to set the upper limit of the rows to search in excess of the actual rowcount. In simple terms: dw_1.find('part_no = 123', 1, dw_1.rowcount()) Never do this!Instead use: dw_1.find('part_no = 123', 1, dw_1.rowcount() + 1) or simply dw_1.find('part_no =…

PowerBuilder ‘Gotcha’ – Datawindow Find method - the full story »

PowerBuilder ‘Gotcha’ – Datawindow retrieval arguments

Posted on July 16, 2010 at 8:22 pm in

So I’m working on a scheduling process and I have a datawindow object which takes a number of arguments.I have them set up as al_pro_id (long), adt_end (datetime), adt_start (datetime), al_resource_id[] (long array), and al_dept_id (long). To save from maintaining two separate objects, I used this object for a datawindow as well as for datastores…

PowerBuilder ‘Gotcha’ – Datawindow retrieval arguments - the full story »

PowerBuilder ‘Gotcha’ – Datawindow.Create function

Posted on July 13, 2010 at 8:20 pm in

I’m working in a custom report application and a tester who is auditing the changes is getting an syntax error when she tries to run her report. The report generator takes the list of columns chosen by the user and builds a SQL statement which is then fed through the SyntaxFromSQL function to generate the…

PowerBuilder ‘Gotcha’ – Datawindow.Create function - the full story »

PowerBuilder ‘Gotcha’ – dddw Edit Type

Posted on July 2, 2010 at 8:20 pm in

Be careful when you change the columns in a datawindow object referenced in another datawindow object when using the DropDownDatawindow Edit Type.  If you change the column name which is referenced in the DDDW Edit Type of another you won’t get a compile error when saving – but you will get runtime errors.  This happened…

PowerBuilder ‘Gotcha’ – dddw Edit Type - the full story »

Comment on PowerBuilder ‘Gotcha’ – dddw Edit Type »

PowerBuilder – Simple datawindow column sort by click

Posted on July 1, 2010 at 8:20 pm in

This sample is for sorting the rows in a grid datawindow ascending or descending based on the user clicking the column header. It only allows for a single column sort at a time. //Clicked event of datawindow // You need an instance variable (string is_sort_column) // This script first checks to see if we've clicked…

PowerBuilder – Simple datawindow column sort by click - the full story »

PowerBuilder ‘Gotcha’ – Datawindow XML

Posted on June 30, 2010 at 8:20 pm in

A feature was added to the datawindow as of version 9 which allows you to save the data as XML (you have to define an export template). The syntax is: ls_xml_data_set = dw_1.object.datawindow.data.xml However, if you have a large string column in the datawindow  – something like a CHAR(32000) – and it contains a lot…

PowerBuilder ‘Gotcha’ – Datawindow XML - the full story »

PowerBuilder ‘Gotcha’ – Autosize Height and strings (wordwrap doesn’t work)

Posted on June 25, 2010 at 8:20 pm in

So I have a datawindow which displays some information in rows about invoices for a customer. There is a ‘notes’ column which contains whatever the salesperson entered at the time of the order. Generally you would want to make sure the column in the datawindow for these notes is flagged with the autosize height property…

PowerBuilder ‘Gotcha’ – Autosize Height and strings (wordwrap doesn’t work) - the full story »

PowerBuilder – Change Background of Modified Columns in Datawindow

Posted on June 17, 2010 at 8:20 pm in

Okay so you have a datawindow with a bunch of rows which can be edited (a grid datawindow is a good choice).  So when the user pulls up the data set and proceeds to change values in a variety of columns and a variety of rows you want to indicate to him that the specific…

PowerBuilder – Change Background of Modified Columns in Datawindow - the full story »

PowerBuilder – Simple ‘Windows Standard’ Row Selection

Posted on May 21, 2010 at 8:20 pm in

Allowing for ‘Windows Standard’ muli row selection is pretty straight forward.  By ‘Windows Standard’ I mean you can select a range by clicking on a row, holding the shift key and clicking on a second row to select all the rows between the two or by holding down the control key and clicking you can…

PowerBuilder – Simple ‘Windows Standard’ Row Selection - the full story »

Top