---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../../modules.md) / [operations/cip](../index.md) / buildCipReportSql

# Function: buildCipReportSql()

> **buildCipReportSql**(`name`, `params`): [`CipReportSqlResult`](../interfaces/CipReportSqlResult.md)

Defined in: [packages/b2c-tooling-sdk/src/operations/cip/index.ts:252](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/67fb8580ac3c5b372617ee3ec3fc8f2bc9f16174/packages/b2c-tooling-sdk/src/operations/cip/index.ts#L252)

Builds SQL for a curated report after validating provided parameters.

## Parameters

### name

`string`

The name of the report to build SQL for

### params

`Record`\<`string`, `string`\>

Parameter values to substitute into the report template, keyed by parameter name

## Returns

[`CipReportSqlResult`](../interfaces/CipReportSqlResult.md)

The report definition and generated SQL string ready for execution

## Throws

If the report name is not found in the catalog or required parameters are missing
