Patent ID: 8266138

Claim:
A method, comprising: receiving a request for a report on database contents of an on-demand database service, utilizing a hardware processor, the request including an identifier of a predefined report template; identifying the predefined report template utilizing the identifier, in response to the request; identifying at least two different objects of the database contents from the predefined report template; identifying information defining a relationship between the at least two different objects from the predefined report template; identifying a type of join operation to be performed on the at least two different objects from the predefined report template, the type of join operation including one of an inner join operation and an outer join operation; performing a join operation of the identified type of join operation on the at least two different objects, according to the identified relationship between the at least two different objects; generating the report including at least a portion of a result of the performance of the join operation; and outputting the report; wherein the predefined report template is configured by a user utilizing a user interface, by: displaying to a user a list of a plurality of primary objects; receiving from the user a selection of a primary object as a first one of the at least two different objects; displaying to the user a list of one or more child objects to the primary object; receiving from the user a selection of one of the child objects as a second one of the at least two different objects; displaying the information defining the relationship between the primary object and the selected child object; displaying at least one of: a first option for an inner join operation to be performed between the primary object and the selected child object according to the relationship; and a second option for an outer join operation to be performed between the primary object and the selected child object according to the relationship; receiving from the user a selection from the displayed at least one of the first option for the inner join and the second option for the outer join; and storing as the predefined report template an identification of the selected primary object, the selected child object, the information describing the relationship between the primary object and the secondary object, and the selected one of the inner join operation and the outer join operation.