How to write multiple sql statement in a single script box for different sections of the report ?

Hi,
I want to write multiple select statements for different sections of a report in a single script box. Is there a way to do that ?
Now i have written a single query and its working fine for me. But its is too big and all the fields are dependent since i am using join in that query.

For Example:
My template is like:


1) <b><u>Personal Details:</u></b>

    Name:${Person.name}

2) <b><u>Work Details:</u></b>

    Office Name :${work.office_name}

I want to write two separate sql statement for personal details and work details. How to do that.

Awaiting for response
Bismay.

Hello.

You can create 2 separate bands (Person and Work as in the above example) and select different data in different bands.

Please see the below example:


<rootBand name="Root" orientation="H">
        <bands>
            <band name="Person" orientation="H">
                <queries>
                    <query name="Person" type="groovy">
                        <script>
                            return [[ ... ]]
                        </script>
                    </query>
                </queries>
            </band>
            <band name="Work" orientation="H">
                <queries>
                    <query name="Work" type="groovy">
                        <script>
                            return [[ ... ]]
                        </script>
                    </query>
                </queries>
            </band>
        </bands>
        <queries></queries>
    </rootBand>

Please let me know if you have more questions.

Thanks Eugene. It worked.