Answers to frequent questions about using Salesforce® reports with Conga Composer.

While Salesforce Reports are useful to gather data for Composer solutions, it is highly recommended to use Conga Queries due to better data gathering performance, versatility, and stability.

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.
      faq1
    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, see About 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}}