NetTalk Central

Author Topic: Printing a report with no detail lines  (Read 3578 times)

Devan

  • Full Member
  • ***
  • Posts: 230
    • View Profile
    • Email
Printing a report with no detail lines
« on: August 18, 2014, 12:05:48 AM »
This isn't technically a NetTalk issue directly, but it affects an NT7 site that we currently have (in Clarion 8 - We haven't upgraded this one to NT8 and Clarion 9 yet).

We have a routine in there that generates a PDF Order Confirmation report on disk and emails it to the user and our client's sales team on a background thread.  All works fine except that it used to NOT create the PDF whenever the user entered an order with no detail lines.

Our client has come back to us and said that even if the user does not enter any lines on the order, they still want the report to generate and be sent to the user and their sales team.  I've done a brief search, and it seems to be popular believe that if we embed:

ReturnValue = 0

on the ThisWindow.OpenReport embed point, it should print the report irrespective of whether it finds detail records or not, but it still does not seem to be working.

Any tips on how we can still get the report to forcibly print the header bands etc.?

Cheers,
Devan

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Printing a report with no detail lines
« Reply #1 on: August 18, 2014, 02:58:23 PM »
On the report engine I use with NT I use a couple of methods. 1) I just inject a record into the report with "Not Details Entered" so it prints the report or 2) I have created a generic PDF page that I just serve up if no PDF is generated.

Devan

  • Full Member
  • ***
  • Posts: 230
    • View Profile
    • Email
Re: Printing a report with no detail lines
« Reply #2 on: August 18, 2014, 03:25:29 PM »
Thanks Kevin.

We have another project where I have a 'placeholder' PDF to serve up when there are no reports, as you suggested.   It worked well, but this particular site is a unique case where on occasion the customer can enter an order with just some comments, and no actual line items being selected.

In these cases, my client wants the order to still be emailed with the customer details in the header and the comments in the footer so their sales team can still chase up the customer.

I am thinking that most of the other workaround are based around 'normal' Clarion reports on Win32 using the Previewer.  In this case, I am generating a PDF directly in the background with no previewer at all, so not sure if those workaround will be effective??

Cheers,
Devan

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Printing a report with no detail lines
« Reply #3 on: August 19, 2014, 12:28:18 AM »
The only way I can think is to inject a "no details found" record in during the report process so your headers print.