Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8398011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:55:39+00:00 2026-06-09T20:55:39+00:00

I have the common problem of not wanting an empty report to be distributed

  • 0

I have the common problem of not wanting an empty report to be distributed to useres when there’s no data for a particular set of parameters.

But I’m not dealing with subscriptions: I have a small app that generates the report as a PDF via web service calls. (Subscriptions, for various reasons, weren’t workable in this environment.) The app is ignorant of the specifics of the report it’s generating, so I can’t have it run the queries in advance, and throwing some kind of exception in the proc when there’s no data would just confuse the web service caller.

But it did occur to me that I might be able to retrieve my reports first as XML, which I could inspect, and then as a PDF if the returned XML showed that data was present.

The downside to this, as I see it, would be that I’d be generating any report with data twice, which cumulatively would be costly. There may be other disadvantages that I haven’t thought of.

You might ask whether I couldn’t do some kind of inspection on the PDF to see if it was empty. What’s keeping me from pursuing that is that the PDF has page headers and footers, and the empty reports I get are in fact one-page reports that include header and footer. Inspecting them for data would be a daunting and very klugy task.

So, has anyone tried this? Could it work?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T20:55:41+00:00Added an answer on June 9, 2026 at 8:55 pm

    I’ll start by answering your questions. I personally haven’t tried this, but I suppose it could work. Skimming the Render documentation it seems you may even get the XML and PDF rendering to both use the same, cached data, though I’m not entirely sure.

    Alternatively, if you have several reports with this issue, you may be able to delegate the Yes/No check for mailing the report to a seperate meta report. The meta report would just have a table with two columns:

    • Report name
    • Should be mailed

    You could render this report once, to XML, and based on that result mail the other reports (or not). This may work best if the data for the other reports is contained, for example in views, so you can just run COUNT(*) on those views for the meta report.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a common problem but the common solutions seems don't work for me.
I think this is a common problem... yet i have not been able to
I thought what I had was a common problem, but I could not find
I have what I think is a fairly common problem, but I cannot seem
I have a common problem, and have looked at several solutions but haven't seen
I have quite common problem, but no idea how to solve it in practice
This seems to be a fairly common problem, but the solutions that I have
I have a common problem that I never know how to solve with CSS:
This is a fairly common problem to which I have yet to find an
This must be a common problem with a common solution. I have a lot

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.