CREATE DB2 VIEWS WITH ORDER BY
Cames across an issue today with a DB2 table with a primary key when used in a Crystal report. The report uses charts that appeared at a Group level in Crystal, the charts x-axis is then sequenced by a date, but when the report is saved and reopened the x-axis sequence reverts to the primary key sequence of the main table and not to the date that has been specified.
My options were
1.Log a call with Business Objects and get them to sort out the issue with their software, but I don’t have time for that.
2. Code a SQL command into Crystal Reports and use the ORDER BY clause to sequence the data correctly. This fixed the issue caused by Crystal, but the performance was not great.
3. Create a new View in DB2 and use that to sequence the data correctly before being used by Crystal Reports. This is when I realised that DB2 does not let you use an Order By clause in a view on the main select statement. Yikes, what next - a stored procedure. Thankfully no - using a sub-select statement in the View works great.
CREATE VIEW VIEW_LAB
SELECT * FROM
(SELECT * FROM LAB ORDER BY DATADATE)
AS VIEW_LAB
I know it’s a workaround from the original Crystal Reports Software issue, but who has the time to fix Crystal Reports.
Quick tip - speed up your website
Tip - Test out the compression of your JPEG images on your web pages using this free online JPEG compressor tool at www. Chami.com.
Even pictures that I thought were pretty well down to there lowest possible size before they lose their clarity - were compressed another 10-20% using this tool.
I reduced the size of a customers slow loading Home page recently by 60% using this tool, adobe photoshop was managing about 40%.
All you do is enter a URL of a JPEG, and it produces 5 images of varying compression ratios, reductions of 30% were still looking good for some of the images I tested.
Its easy to use - so give it a try.
How To Add a Virtuemart Product to a Joomla Article
How do you add a virtuemart product to a regular Joomla article or module ? I have seen sites where they try and add the HTML code created by virtuemart for a product into an article, there is a simplier way of doing this.
Use the vmproductsnapshots plugin in the Joomla Plugin Manager. Ensure the plugin is enabled, the plugin has options to configure how the product is displayed - you can set product name to display, thumbnails, a short description and whether to show the proce and an add to cart button.
So to display a product in an article enter the following tag format into the body of the article
{product_snapshot:id=10}
This would display Product with id equal to 10 in the article where you positioned this code, and it would display the product in relation to the options that are set on the product plugin.
Showing multiple products try :
{product_snapshot:id=24|25|26}
or you can even set your own options that will override the plugin paramaters, use this format
{product_snapshot:id=xx,showname=y|n,showimage=y|n,
showprice=y|n,showdesc=y|n,showaddtocart=y|n,
displayeach=h|v,displaylist=v|h,width=90%,
border=0,style=color:black;align:left}

Virtuemart Product Plugin Options
Virtuemart - shopping cart styles - where are they ?
To change the layout of the virtuemart minicart module, look at the following php file
/components/com_virtuemart/themes/default/templates/common/minicart.tpl.php
Also to
alter virtuemart button styles
look in the style sheet
/components/com_virtuemart/themes/default/theme.css
Top 5 Joomla Security Tips
When starting with Joomla, consideration should be given to the security set up for your new web site. Here are our top tips to avoid if you want your web site taken over by hackers.
Always update to the latest version of Joomla for any security patches
You can subscribe to the joomla security teams rss feed here. The critical fixes are essential. Of course you need to ensure that the latest joomla installation works OK with all your extensions that you have installed - best to try on a test or development site that you have installed before updating your live site.
Change the default administrator login
When joomla is first installed the administrators user name is admin, this should be changed to something less familar from an admin user. Your admin password should also be a combination of numbers,letters and special characters - more than 10 characters preferably. Best not to use this username or password on any other web site that you are regsitered for.
Get a good SEF component
If a hacker know your site is a joomla site, this can make it easier for him to find vunrabilities and exploit them. A good SEF Search Engine Friendly URL component will help mask the components and the folder structure of your web site. Artio SEF and sh404SEF.
Beware 3rd party components and templates
Most 3rd party components are there to help you build a feature rich web site, but beware there are some extensions that could potentially leave your site open to a hacker. Always source your extensions from a trusted source and check for updates to that extension. Similary with templates.
Backup backup backup your web site
Your no doubt the one responsible for backing up your own site, it is unlikely to be the responsisbility of the web developer or hosting company. So backup up your MySQL database and all your web files. This is normally carried out via cPanel or there are some commercial backup solutions for joomla.










