Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4729 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hello,

I have been struggling with an irritating issue that can be summed up as follows:

even though I can preview correctly the Current Record I cannot print it.

See:

  • current_record_preview.jpg picture
  • current_record_printout.pdf file

Background

All the data of my current project come from the DEVIATION table

All layouts are based on the DEVIATION table.

I have a Deviation Detail layout used to enter the DEVIATION table data.

I have a Deviation History Report layout used to report and print the DEVIATION table data.

I have a Print Report Script that allows the user to select whether he/she wants to print the current record or all the records.

The Print Report Script seems to do is job right when dealing with all the records--it displays all records correctly in preview mode and print them. However, when the user select the option: "Current" record, although the script picks and displays correctly the current record in preview mode it prints a blank sheet that has only the Header and Footer but is not able to print the contents of the five subsummaries of the report.

Deviation History Report Layout

In order to generate and print a Report that contains data counts per Year, Quarter, Month, Deviation Origin, and Deviation Subject I have set up the Deviation History Report Layout (Default view: List view) based on the DEVIATION table.

The Deviation Report layout has the following structure:

HEADER that contains the "Deviation Report" text and "Total" text

Sub_summary by z_DateDeviationYear (Leading) that contains the folllowing fields:

DEVIATION::z_DateDeviationYear and DEVIATION::DeviationCount

Sub_summary by z_Quarter (Leading) that contains the folllowing fields:

DEVIATION::z_Quarter and DEVIATION::DeviationCount

Sub_summary by z_DateDeviationMonth(Leading) that contains the folllowing fields:

DEVIATION::z_DateDeviationMonthDate and DEVIATION::DeviationCount

Sub_summary by DeviationOrigin (Leading) that contains the folllowing fields:

DEVIATION::DeviationOrigin and DEVIATION::DeviationCount

Sub_summary by DeviationSubject (Leading) that contains the folllowing fields:

DEVIATION::DeviationSubject and DEVIATION::DeviationCount

FOOTER with the Date Printed and Page Number

Deviation History Report

The purpose of the Deviation Report is to come out with the following basic report:

Deviation Report Total

Year Number of Deviations per Year

Quarter Number of Deviations per Quarter

Month Number of Deviations per Month

Deviation Origin Number of Deviations per type of Deviation Origin

Deviation Subject Number of Deviations per type of Deviation Subject

See: all records.pdf file

Print Record Script

On the Deviation Detail Layout, based on the DEVIATION table, I have a Print icon attached to the Print Report Script.

The Print Report Script generates and prints reports based on the user choice of: “All”, “Current” or “Cancel” to the question: Would you like to print the deviation in the found set or just the current contact?

The contents of the Print Report Script are the following:

Allow User Abort [ Off ]

Set Error Capture [ On ]

Enter Browse Mode [ ]

New Window [ ]

Adjust Window [ Maximize ]

Go to Layout [ “Deviation_History_Report ” (DEVIATION) ]

Show Custom Dialog [ Title: "All or Current?"; Message: "Would you like to print the deviation in the found set or just the current contact?"; Buttons: “All”, “Current”, “Cancel” ]

If [ Get(LastMessageChoice) = 1 ]

Show All Records

Sort Records [ Restore; No dialog ]

Print [ Restore: Samsung ML-2010 Series ]

Else If [ Get(LastMessageChoice) = 2 ]

Show All Records

Omit Record

Show Omitted Only

Sort Records [ Restore; No dialog ]

Print [ Restore: Samsung ML-2010 Series ]

End If

Adjust Window [ Restore ]

Go to Layout [ original layout ]

Observations

The “record showing” part of the Print Record Script works fine since:

  • it shows and sorts out correctly all the records when the user chooses “All”
  • it shows and sorts out correctly just the current record if the user chooses “Current”
  • cancels if the user chooses “Cancel”

The problem lies with the “record printing” part of the Print Record Script since:

  • when the user chooses “All”, it prints all the records as expected.
  • when the user chooses “Current”, it prints just the Header and Footer part of the Report and not the contents of the Subsummary parts

So, even though I can preview the current record correctly I cannot print it, neither to a printer neither to a PDF file.

I cannot sort out the problem changing the Default View of the Deviation History Report (List or View)

I cannot sort out the problem creating a Report Script just for previewing and printing only the Current Record.

Report: Deviation Print Current Record Only

# Error Handling

Allow User Abort [ Off ]

Set Error Capture [ On ]

Enter Browse Mode

New Window [ ]

Adjust Window [ Maximize ]

Go to Layout [ “Deviation_History_Report ” (DEVIATION) ]

# Select the current record only

Show All Records

Omit Record

Show Omitted Only

# Record sorting

Sort Records [ Specified Sort Order: DEVIATION::z_DateDeviationYear; ascending

DEVIATION::z_Quarter; ascending

DEVIATION::z_DateDeviationMonth; ascending

DEVIATION::DeviationOrigin; ascending

DEVIATION::DeviationSubject; ascending

DEVIATION::DeviationTitle; ascending ]

[ Restore; No dialog ]

# Record printing

Enter Preview Mode

Print [ ]

Enter Browse Mode

Adjust Window [ Restore ]

Go to Layout [ original layout ]

So, this is the history of the Current Print that Wouldn't Print.

Any suggestions?

natursalus

Posted

See:
  • current_record_preview.jpg picture
  • current_record_printout.pdf file

Hi natursalus,

No attachments. BTW, it would help to see the file itself. :-)

Posted

Hello LaRetta

Thanks for looking into it.

You are right, the attachments are all gone. Don't know what happened.

Meanwhile I was able to find a way around the problem.

The fix was to modify the Print script step settings so that the setting for Print should always be: "Records being browsed", no matter what is being printed-- the current record or all the records.

All my problems were produced by the fact that I had the setting "Print: Current record" when printing just the Current record. The moment that I changed that to "Print: Records being browsed", Bingo! I was able to get the current record printed out.

Although it doesn't make much sense to me, at least now is working.

Thanks,

natursalus

Posted

You are right, the attachments are all gone. Don't know what happened.

Did you zip the files before posting?

This topic is 4729 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.