Sunday, August 11, 2013

How to achieve shift-click (contiguous) select on a Lazarus TDBGrid


Please follow this link to my post in the Lazarus forum

ps: Comments and/or links to this article are most welcome!

Thursday, July 18, 2013

FortesReports: Misc info

This post will accumulate info on FortesReports, the reporting tool used in Lazarus/FreePascal.

Once enough info has been collected and cleaned up, it will be passed on to the Lazarus group.
------------------------

- Grouping and ORDER BY
Groups in a report do not force a sort by that field.
If you have a SELECT f1, f2 FROM dooda ORDER BY f2
and create a report which groups by f1, you will end with multiple breaks, as f1 changes values while moving through the recordset.
To avoid that, you will need to SELECT f1, f2 FROM dooda ORDER BY f1, f2



ps: Comments and/or links to this article are most welcome!

Saturday, May 25, 2013

FreePascal/Lazarus: How to use lookup combo in DBGrid

I recently worked on a project where I used FreePascal in order to create an app that consisted of a single EXE and which did not need to be installed (portable app).

I had some difficulty in getting a lookup column in the grid and, after lots of searches pointing to convoluted solutions, I came across the following 2 pages, which gave me the info I needed to solve the problem.

Defining a Lookup List Column

Defining a lookup field

In a nutshell, you need to create a lookup field in the TSqlQuery (or whatever query type you use).
You then add a new field in the grid control and link it to the lookup field you created in the query.

Using this method means that you must specify the UPDATE and INSERT SQL (just in case you used to rely on what FreePascal/Delphi generated).


For example, in this case, the CrewMembers table contains a CrewID but not the CrewName.

A lookup field is created in the CrewMembers query, as show below



I want to show the CrewName from the Crew table when I am editing the CrewMembers table.
The CrewMembers table contains only the CrewID, not the name.


LookupDataSet= A Dataset that loads data from the Crew table
LookupKeyField= The name of the key field in the Crew table that I will link to via my CrewID
keyFields=The name of the key field in my table/grid (in this case, CrewID)

This is a just a quick overview. Leave a comment if you'd like more info.

[Blatant plug! See my article about my album on Google Play.]


ps: Comments and/or links to this article are most welcome!

Thursday, March 21, 2013

Extensive comparison of rss/news readers

I recently found this page, containing a large number of rss/news readers and a features table comparison.

Now that Google Reader has been shot in the head, this page may just help you find a replacement.


ps: Comments and/or links to this article are most welcome!

Sunday, January 20, 2013

Win7 window-title double click does not maximise...

Somehow, I found myself double-clicking on the top border of a window in Win7 and...nothing happened.
I had rather hoped that the window would maximise vertically, as it had countless times before.

I blamed it on the extreme heat we've been having here in Melbourne (no, not the one in the US, I mean the real one), so I put up with it for a week or two.


Eventually my nerves couldn't take it any more, so I found this fix:
(This fix should also work in Vista. The best fix though is to ditch Vista, kick yourself for ever installing it on your computer and stay with Win7-64.
Also, there is no need to pay more money to Microsnuff. 
No, you don't need Win8!)

- Open Control Panel.
- Click on 'Ease of Access'
- Click on 'Make the Mouse easier to use'
(be warned, the computer will start talking to you. Don't worry, its just subliminal messages from Steve Balmer trying to make you:
   - Buy Win8
   - Switch from Google to Bing (Bing what???I hear you say)
   - repeat above 2 steps forever)

- Make sure the 'Prevent windows from being automatically arranged...' checkbox is *not* checked
- Done!



ps: Comments and/or links to this article are most welcome!

Tuesday, December 18, 2012

How to cater for Internet Exploder...

I found (yet another) a very handy article that will be of help to anyone that has to support Internet Exploder.



ps: Comments and/or links to this article are most welcome!

Sunday, November 4, 2012

List of JS/CSS loaders

Here is a handy feature-comparison list of JS/CSS loaders that helped me
when I was searching for just such a loader.



ps: Comments and/or links to this article are most welcome!