How to Export Power BI Reports to PDF Programmatically
The billing run is finished, and finance is ready to review it. But someone still has to turn the reports into a complete, protected PDF pack and put it where the team can find it.
Your application can ask PBRS to do that work. PBRS can export and combine reports, format supporting data, apply passwords and other protections, and deliver the finished pack—all through a reporting job you prepare once.
- The finance review Give the team a finished pack when billing closes
- Beyond the export Build a PDF that is ready to use and share
- Set it up Prepare the pack before connecting your application
- For developers Let your application start and track the reporting job
- Your next step Make the finished PDF part of the billing routine
Give the team a finished pack when billing closes
Picture the person responsible for closing the month's billing. The processing is complete, but the finance meeting needs a summary, an exceptions report and the supporting figures. Sending three separate attachments leaves everyone to assemble the story themselves. Exporting them manually leaves the operator with another task at the busiest point of the month.
PBRS lets you make that pack part of the application workflow. Prepare the reports and delivery instructions in PBRS, then use its API to start the saved job when billing is complete. Finance receives the document it needs without waiting for someone to download, combine and send the files.
The value goes well beyond generating a PDF. The pack can contain several reports in a deliberate order, carry a confidentiality watermark, require a password and use the printing or copying permissions appropriate to its audience. If finance needs a table of exceptions rather than another dashboard page, PDF Data Only gives you a different way to present those figures.
You can also export Power BI reports to PDF programmatically with Microsoft's ExportTo API. That route produces a file your application can retrieve. PBRS is a better fit when your requirement includes the preparation and distribution work around that file, and you want those instructions maintained in a reporting tool.
Start with the recipient
Ask finance what they need to open at the meeting: which reports, which month, what protection and where the pack should arrive. Those answers define the job your application will request.
Build a PDF that is ready to use and share
The first version might be a single billing summary. As the review grows, PBRS gives you ways to improve the document without turning each new reporting requirement into another PDF-processing feature in your application.
Bring related reports together
Use a PBRS report package to combine multiple PDF outputs into one ordered document. Put the summary first, exceptions next and supporting detail after that. Finance can read the pack in sequence rather than search through attachments.
The source reports can include supported Power BI, paginated, Power BI Report Server and SSRS reports. A paginated report is useful when the supporting schedule needs a print-oriented layout with carefully designed pages. Data-driven packages can vary the reports, filters, parameters and destinations for each recipient, so different teams receive the pack intended for them.
Protect the document before it leaves
For a confidential billing review, PBRS can apply separate user and owner passwords and 128-bit PDF encryption. Passwords can be fixed or supplied from data for individual recipients. That makes protection part of the saved workflow instead of something the operator must remember after exporting.
You can control printing, full-resolution printing, copying, editing, adding notes, filling fields, assembling the document and accessibility copying. Decide what the recipient needs to do, then test those settings in the PDF readers your organization uses. These permissions help control normal document use, but cannot guarantee that information will never be copied.
Make the purpose and lifetime clear
A text or graphic watermark can identify the pack as confidential, show recipient information or add a company logo. PBRS provides positioning, angle and overlay controls. You can also give the PDF an expiry date with a custom message, helping distinguish an old review pack from the one the team should use now.
For additional presentation work, PBRS custom tasks can add formatted headers, footers or positioned body text. A billing-period heading or a short instruction can make the delivered document easier to understand without requiring someone to edit every file by hand.
When you need additional DRM controls
Optional PDF DRM can restrict access to approved email addresses, limit the number of devices that open the document and restrict permitted print attempts. These DRM features require a separate All-About-PDF Developer License. Standard PDF expiry with a custom expiry message does not require that additional license. Test the complete opening and access experience with the intended recipients before rollout.
Use PDF Data Only for the figures behind the discussion
Suppose finance wants the exceptions table, with clear currency columns and readable totals, rather than an image of the dashboard. PDF Data Only exports summarized data or permitted underlying data from selected, titled Power BI visuals. Multiple visuals can contribute their data on separate pages of the PDF.
PBRS can style headers, alternating rows and row or column totals where those totals are present in the exported data. You can rename columns, choose data types, apply custom formats and reuse saved styles. Underlying-data availability still depends on the model and Power BI permissions; this is not a way around source restrictions.
Finish the delivery as well as the document
Give the pack a recognizable filename and send or save it through the configured destinations, such as email, a shared folder or SharePoint. Recipient-specific settings can keep the report selection, password and destination together. The PBRS PDF automation guide covers these output and protection choices.
With a direct Microsoft export, your team owns the additional merging, protection and delivery steps. Power Automate can coordinate a straightforward workflow, but those extra requirements bring more actions, connections and failure paths to maintain. PBRS keeps the reporting work in one prepared job that your application can request.
Check the native API requirements before choosing your route
Microsoft's standard Power BI report ExportTo API requires a workspace backed by Premium, Embedded or Fabric capacity; PPU is not supported for this API. Your application starts the export, polls for completion and retrieves the file. Check Microsoft's export documentation for authentication, tenant settings and supported report features.
PBRS has its own licensing and runs in your Windows environment. It supports Power BI Pro, PPU and capacity-based environments, but you still need the Microsoft licensing, source access and configuration appropriate to your reports. Validate the actual report and export method during evaluation.
Keep the rules with the pack
The finance pack's report order, protection and destination belong together. Saving those choices in PBRS makes the next monthly run repeatable and gives the reporting team a clear place to maintain them.
Prepare the pack before connecting your application
Start with one billing period and a controlled destination. Before adding the application call, produce a document the finance team recognizes and can approve.
Choose the content and the audience
Select the summary report, reporting month and required pages or parameters. Add the exceptions and supporting reports if the pack needs them. Decide whether each section should preserve the report layout or present visual data through PDF Data Only.
Keep recipient selection explicit. A saved reporting job does not inherit the filters in someone's open browser, and a caller should not be able to request another team's confidential pack simply by changing an identifier.
Prepare the finished document
Configure the package order, filename, watermark and required protection. If the review needs printing but should discourage editing, make those permissions part of the job. Where you merge outputs or add custom processing, check the final delivered PDF to confirm it retains the intended protection and presentation.
Open that final copy with finance. Check a known billing total, the period shown, the report order, table readability and password behavior. An export that ran successfully can still contain the wrong month or an awkwardly formatted table; this review catches the problems that matter to the person using it.
Connect the business event
Once the job works from PBRS, have your application request it after billing and any required reporting-data refresh have completed. Finishing the billing transaction does not necessarily mean Power BI already contains the updated figures.
Give the operator useful progress messages: “Preparing the finance pack” while it runs, followed by a confirmed result. Keep the billing batch reference with the execution record so support can find this particular attempt if the pack does not arrive.
Test the delivered copy
Open the PDF from the destination finance will actually use. Check the pages, figures, password and permissions there. Testing only an intermediate export can miss changes introduced by merging or delivery.
Let your application start and track the reporting job
Your application decides when the pack is needed. PBRS executes the reporting instructions already saved for that job. This keeps PDF assembly and delivery settings out of the billing code while still letting the application show progress.
The example below starts a single-report schedule—the initial billing summary. For a multi-report package, use that package's documented schedule type and identifier. It is an execution request, not a request body containing PDF security or merging options; configure those in the appropriate PBRS job first.
Developer example: start and monitor the prepared PDF job
Use a working PBRS API service, an authorized access token and an existing schedule tested against a controlled destination. Replace the illustrative identifier and placeholders with your installation's values, and use HTTPS for network connections.
POST {pbrsBaseUrl}/api/Schedule/ExecuteScheduleAsync
Authorization: bearer {pbrsAccessToken}
Content-Type: application/json
{
"ScheduleType": "report",
"uniqueid": 101,
"RunBy": "Billing review PDF"
}
GET {pbrsBaseUrl}/api/Schedule/GetExecutionStatus?ExecutionId={ExecutionId}
Authorization: bearer {pbrsAccessToken}
Retain the returned ExecutionId immediately. It identifies this run; uniqueid identifies the saved schedule. RunBy is a descriptive label, not an authorization control.
Poll with a deadline. When the status is Completed, inspect the result rather than treating that status alone as success. The response's string-valued ResultJson contains the result and error details. Follow the PBRS execute-and-monitor guide for the full response handling and delivery checks.
If submission times out, investigate before resubmitting: PBRS may already be running the job. Your application's timeout does not cancel it. Keep API credentials on the server and authorize which prepared jobs each application user may request.
Give the operator an answer they can use
For the billing team, “request accepted” means the pack has started, not that finance can open it. Confirm the execution result and intended delivery before displaying a ready message. If the destination fails, retain enough context for support to investigate without asking the operator to repeat the billing run.
Also decide whether this job runs only on request or has a recurring schedule. Coordinating those triggers avoids an API request and a scheduled run producing duplicate packs for the same billing period.
Keep a reference to this run
Store the billing batch reference, saved job identifier and returned execution identifier together. When someone asks where the pack went, support can investigate the right attempt without generating another copy.
Make the finished PDF part of the billing routine
When the next billing run closes, the operator should be able to move on knowing that the finance pack is being prepared. The summary, supporting reports, protection and delivery should follow the same agreed routine each time.
A direct export API can supply a PDF. PBRS is worth choosing when the real requirement is a complete document: assembled in the right order, readable, protected for its audience and delivered to the right place. Your application requests the job; the reporting team maintains how that job produces the finished result.
Explore the PBRS report automation API to plan the integration, or see Power BI Report Automation for the wider reporting workflow. Use the evaluation guide below to bring your report, PDF protection and delivery requirements into the trial.
Contributors:
Christian Ofori-Boateng
CEO, ChristianSteven Software
