Skip to main content
Conga Support

Frequently Asked Questions about using Salesforce Reports in Conga Composer

How can I filter the report on something other than the Master Object Id?

Although Conga Composer® will use the Master Object ID as the default filter value in the report’s Advanced Filters, you may override this behavior and use any field from the master object.

You can also use a field from a parent of the master object, like an Account field related to a Contact.

To use a different field, you’ll need to do the following:

  • Configure your report to receive the desired value.
  • Update your Conga Composer button to send the desired value.

Configure your report to receive some other field value:

  1. Edit the report.

  2. In the Filters section, add a field filter and select the field you’d like to use in the field drop-down list.

  3. Leave the Value field empty (This cell is known as pv0).

  4. Save the report.

Let’s extend our example from earlier. Instead of creating a directory of Contacts at a given Account, let’s say we want all Contacts who are in the same state as the Account (but not necessarily affiliated with the Account). In the image above, the Account ID field has been replaced with Contact Mailing State/Province so that we can search for Contacts who are in the same State/Province as the Account.

Update your Conga Composer button to pass the desired value to the report:

  1. Edit the Conga Composer button.
    Setup > App Setup > Customize > [Object] > Buttons and Links > Edit

  2. At the end of the URL, add ?pv0= to the ReportID parameter.

    When using ?pv0=, the pv must be lowercase. Do not use fields that contain commas or ampersands to filter reports, as these interfere with report results.

  3. Select the Billing State/Province field from the Insert Merge Field drop-down list.

How can I filter a report with criteria from two or more fields?

For even more demanding situations, you can pass a second, a third and even as many as five parameters to the same report. The values for those parameters are numbered sequentially: pv0, pv1, pv2, etc.  Each pv parameter must be separated with a tilde symbol (~).  The pv in the pv parameter must be lowercase letters.

Use ID fields in filters instead of name fields to ensure correct results.

When passing numeric date values to a report, you must pass them in the US date format, mm/dd/yyyy. You can ensure the correct format by using a Salesforce formula field to parse a Date field.

Extending the example from above, let’s say we want a list of all contacts in the same State/Province as the account and who are also doctors.

The selection criteria of the report would need to be:

The ReportID parameter in the Conga Composer button URL would use pv1 to filter appropriately:

How can I filter the report with two or more values from one field?

You may use multiple values in a single pv value by separating each value with a pipe symbol ( | ).

Again, extending the previous example, let’s say we want a list of all contacts in the same State or Province who are either doctors or professors. In this case, the report is already ready to receive the filter criteria. We only need to change the ReportID parameter of the Conga Composer button by updating pv1:

My report already has filter criteria under Advanced Filters. Can Conga Composer filter the report using subsequent rows in Advanced Filters?

Yes. If you want Conga Composer to filter your report with a value in, say, the pv1 position, you may define the ReportId parameter in your button to use any combination of pv positions.

Let’s say your report has filter criteria in the first row of the Advanced Filters (i.e., the pv0 position) and you want Conga Composer to supply filter criteria for the second row (pv1).  You could specify that as:

&ReportId=[ContactsWithAcctState]00O5000000001LNBd?pv1={!Account.BillingState}

What if I don’t want to dynamically filter the report? I just want the report contents as-is.

You can retrieve the contents of a report without applying any dynamic filtering by passing an empty value for pv0:

&ReportId=[StaticContactList]00O5000000001LNBd?pv0=

How can I gather data from multiple reports?

You may include up to 50 ReportID parameters in a Conga Composer URL, thus making 50 reports accessible in a single merge operation.

To do so, enter a comma at the end of the first report ID parameter, followed by the next report ID as shown below, followed by its comma, and so on.

If a report alias is not included, Conga Composer will assign dataset names based on the sequence of report IDs included in the button URL (the first report ID has a dataset name of ReportData, the second is ReportData1, and so on).

Do not include spaces anywhere in your Conga Composer button URL.

Here, we have Conga Composer configured to pull data from four reports:

https://composer.congamerge.com?Sess...PI.Session_ID}
&ServerURL={!API.Partner_Server_URL_290}
&Id={!Contact.Id}
&ReportID=[OpenActivities]00O50000001NGuW,
[Opptys]00O50000001O2gr,
[Referrals]00O50000001NGv5?pv1={!Contact.MailingState},
[Cases]00O50000001NGvL

Each of these reports would be visible through the Template Builder window as a separate dataset. Conga Composer automatically assigns the worksheet names based on the report alias specified.

How can I control the sort-order of the data retrieved from a report?

You can control the sort-order of the information Conga Composer retrieves from a report:

  1. From the Reports Tab, run the Report by clicking its name.

  2. Click the column-header label of the desired column to sort by.

  3. Save the report.

Say your report shows a list of Contacts related to an Account and you’d like the list of contacts sorted by Last Name.  To set the sort-order, you would run the report, click on the Last Name column (even though the report may have zero rows of information currently on it), then save the report.

When Conga Composer interacts with the report, the data it gathers is sorted according to your sort-order choice.

You can sort on multiple columns by changing the report to a Summary Report and summarizing on another field. Conga Composer doesn’t use the summary information, but will adhere to the sort-order of the report.

I’m creating Quotes (or Invoices) from an Opportunity and its related Opportunity Line Items. Do I need a report to retrieve the Opportunity Line Items?

No, in this particular case, you don’t. Conga Composer automatically makes Opportunity Line Items available to you without any reports because the master object is an Opportunity.

Opportunity Line Items appear as a separate dataset (OppLineItems) in the Template Builder window:

For more information, seeAbout Data in the Template Builder.

How can I use my own label for a dataset?

You may supply an alias for a Report (or Query) to override the default name. Please follow these guidelines:

  • The alias must precede the Salesforce® Report (or Query) Id.

  • It must be enclosed in square brackets ([ ]).

  • It may contain only alphanumeric characters; punctuation marks and other special characters are not permitted.

  • It must contain at least 2 characters and but not more than 20 characters.

  • It must be unique within the entire Conga Composer URL.

  • Spaces are not permitted within an alias, or between the brackets and the Report Id.

  • Reserved sheet names (Master, Org, User, ReportData, etc.) may not be used as an alias.

In this example, an alias has been added to each Report Id.

The resulting datasets in the Template Builder window appear as (following the same order they are entered in the button URL):

The field names in your template must then refer to the alias name.  For example, in Microsoft Word® would you create a field for {{TableStart:Contracts}} and {{TableEnd:Contracts}}.  Learn more about aliases and datasets in Conga Composer QuickStart 3 – Using Reports to Gather Additional Data.