Splunk Search

How to display the search time range and description in a PDF report?

thambisetty
SplunkTrust
SplunkTrust

Hi,
As I am generating PDF reports, I want the description and the time range used for the search that generated the data to display on the PDF. How do I do this?

————————————
If this helps, give a like below.

somesoni2
Revered Legend

You can add a single value panel as mentioned below to get the search timeline.

<dashboard>
  <label>ShowSearchDate</label>
  <description/>
  <row>
    <panel>
      <single>
        <searchString>|gentimes start=-1 | addinfo | convert ctime(*) | eval reportDate=info_min_time." to ".info_max_time | table reportDate</searchString>
        <earliestTime>-60m@m</earliestTime>
        <latestTime>now</latestTime>
        <option name="drilldown">none</option>
        <option name="beforeLabel">Report Date:</option>
        <option name="linkView">search</option>
        <option name="afterLabel">.</option>
      </single>
    </panel>
  </row>
  <row>
    <panel>
      <chart>
        <title>Internal Sourcetype Distribution Report</title>
        <searchString>index=_internal | stats count by sourcetype</searchString>
        <earliestTime>-60m@m</earliestTime>
        <latestTime>now</latestTime>
      </chart>
    </panel>
  </row>
</dashboard>

thambisetty_bal
Path Finder

The above is mentioned for dashboard , what if I want to print time range in report.

TonyLeeVT
Builder

Agreed. A solution for a report would be ideal.

0 Karma

dharshini
Explorer

Can anyone help mention the solution? Like how to display the time-range for which the search was run on a PDF report.
Thanks.

0 Karma

ateterine
Path Finder

I have the same question, @ppablo_splunk, @thambisetty, do you guys have an answer to this?
Thanks!

0 Karma

ppablo
Retired

Hey @ateterine

Unfortunately I don't know how to do this, but I edited the title and clarified the content so hopefully some PDF reporting experts will be more inclined to chime in 🙂

Patrick

0 Karma

thambisetty
SplunkTrust
SplunkTrust

I want to display the time range used for the search that generated the data and description also on the PDF

————————————
If this helps, give a like below.
0 Karma

ppablo
Retired

Hi @thambisetty

Do you want to display the time range used for the search that generated the data on the PDF? or the time it took to actually generate the PDF itself?

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...