Report Print Error: Error Printing - Unable to Print

Hello Folks,

I have been printing a report into a clarion application, after the report is generated i use to press the print button after which the print command shows me the errors as in screenshots attached,
Also while printing the report in landscape mode report data cuts off the page, is their any setting that needs to be done in clarion IDE for page settings,

MicrosoftTeams-image (1) MicrosoftTeams-image

Any help would be really appreciated

That is most likely not Clarion problem. I would check if the printer driver is up to date. Did you try printing using different printer? Try “Microsoft print to PDF” for example.

I understand “after the report is generated” you mean when your app displays print preview ? Please note that scaling elements on print preview and printout depends on the printer driver.

Not sure what you mean “while printing the report in landscape mode” - in your report you define report size and orientation. When you try to print Portrait report in Landscape orientation some elements may be cut off

See examples
! Portrait report declaration
Report REPORT('People Report REPORT,AT(1000,2000,6250,7688),PRE(RPT),PAPER(PAPER:A4),FONT(‘Arial’,10,FONT:regular,CHARSET:ANSI),THOUS
HEADER,AT(1000,1000,6250,1000),USE(?Header),#ORDINAL(1)
END
! where AT(x,y,width,height) The x and y parameters are relative to the top left corner of the print structure

! Landscape report declaration
Report REPORT,AT(1000,2000,7688,4250),PRE(RPT),PAPER(PAPER:A4),LANDSCAPE,FONT(‘Arial’,10,FONT:regular,CHARSET:DEFAULT),THOUS
HEADER,AT(1000,1000,7688,1000),USE(?Header),#ORDINAL(1)
END

Here is my example C11 app using Capesoft Premiere - see if you can print from it on your printer. If you don’t have Premiere template you can just run exe , but you can also open the app in C11 - won’t compile without Premiere though

2 Likes

Hi @greg,

Sorry for the orientation, i meant landscape mode

When using “Microsoft Print to PDF” option in settings it always ends up saying the screenshots that i attached above, also the table that has large data often cut off when it’s in landscape mode.

image

@greg If you see here the report is being cut off on the left and right edges, i don’t understand the issue here,

Your help is appreaciated, but can you provice me solution for these?

@vedant

This can happen if your report band is outside declared report area or your whole report structure declared outside printable area . There are differences between printer drivers so you need to make sure you leave enough margin so that your report prints on different printers.
You need to adjust AT(,) attributes of your report bands and controls so that they fit in your paper size if your report is landscape you also need to indicate orientation of the report.
You can see and edit the report structure code when you press the square […] button next to the report button .

This is an example of one of my landscape reports
report REPORT,AT(5,22,285,170),PRE(RPT),LANDSCAPE,FONT(‘Verdana’,9,CHARSET:DEFAULT), |
MM
HEADER,AT(5,10,285,16),#ORDINAL(1)
STRING(‘Some header’),AT(72,6),USE(?String34:2),TRN,#ORIG(?String34),#ORDINAL(2)
STRING(@s120),AT(2,1,282,5),USE(ReportTitle),CENTER,TRN,#ORIG(ReportTitle),#ORDINAL(3)
STRING(‘Some header’),AT(99,6),USE(?String34),TRN,#ORIG(?String34),#ORDINAL(4)
STRING(‘Some header’),AT(126,6),USE(?String21),TRN,#ORIG(?String21),#ORDINAL(5)
LINE,AT(3,11,280,0),USE(?UnderLine),COLOR(COLOR:Black),#ORIG(?Line2),#ORDINAL(8)
END
detail DETAIL,AT(,284,4),USE(?detail),#ORDINAL(9)
STRING(@s12),AT(2,0,27,5),USE(FILE:Somefield1),#ORIG(FILE:Somefield),#ORDINAL(10)
STRING(@s20),AT(29,0,44,5),USE(FILE:Somefield2),#ORIG(FILE:Somefield2,#ORDINAL(11)
STRING(@s20),AT(71,0,44,5),USE(FILE:Somefield3),#ORIG(FILE:Somefield3),#ORDINAL(12)
END
END
FOOTER,AT(5,192,285,5),#ORDINAL(81)
STRING(@pPage <<<#p),AT(134,1,17,3),USE(?PageCount),FONT(‘Verdana’,8,FONT:regular, |
),PAGENO,#ORDINAL(82)
END
END

See “Report Designer Lesson” topic in help for explanation of all the attributes.

2 Likes

If you select your code and click the </> button in the toolbar it gets formatted as code and looks nicer. More important is it does NOT change things like single quotes to typesetter quotes so the code can be pasted into Clarion and used.

image

Your post formatted as </>. it may not be perfect because your post was not code so I fixed single quotes and indenting.

report REPORT,AT(5,22,285,170),PRE(RPT),LANDSCAPE,FONT('Verdana',9,CHARSET:DEFAULT),MM
    HEADER,AT(5,10,285,16),#ORDINAL(1)
       STRING('Some header'),AT(72,6),USE(?String34:2),TRN,#ORIG(?String34),#ORDINAL(2)
       STRING(@s120),AT(2,1,282,5),USE(ReportTitle),CENTER,TRN,#ORIG(ReportTitle),#ORDINAL(3)
       STRING('Some header'),AT(99,6),USE(?String34),TRN,#ORIG(?String34),#ORDINAL(4)
       STRING('Some header'),AT(126,6),USE(?String21),TRN,#ORIG(?String21),#ORDINAL(5)
       LINE,AT(3,11,280,0),USE(?UnderLine),COLOR(COLOR:Black),#ORIG(?Line2),#ORDINAL(8)
    END
detail DETAIL,AT(,284,4),USE(?detail),#ORDINAL(9)
       STRING(@s12),AT(2,0,27,5),USE(FILE:Somefield1),#ORIG(FILE:Somefield),#ORDINAL(10)
       STRING(@s20),AT(29,0,44,5),USE(FILE:Somefield2),#ORIG(FILE:Somefield2),#ORDINAL(11)
       STRING(@s20),AT(71,0,44,5),USE(FILE:Somefield3),#ORIG(FILE:Somefield3),#ORDINAL(12)
    END
    FOOTER,AT(5,192,285,5),#ORDINAL(81)
       STRING(@pPage <<<#p),AT(134,1,17,3),USE(?PageCount),FONT('Verdana',8,FONT:regular),PAGENO,#ORDINAL(82)
    END
END

Thanks Carl, was looking for this option, but there is no feature to edit post on this forum so was not able to test.
I tried using that one - selected the code and pressed </> but apparently didn’t work. I’m more used to Jira or Wiki code tags.
Actually as I was writing this reply I noticed that <pre and <code tags work in here as well.

IMHO, these are much more convenient as you can clearly see the start and end of the tag which is quite hard to see with indentation if your code wraps to a new line.

Anyway, I was trying to point vedant to the direction of checking his AT attributes, he does not need to copy the code, the code is just an example irrelevant to his report. Did not want him to do Ctrl+C/Ctrl+V programming, that can lead to a disaster :wink:

Test edit
1 Like

At the bottom right of each post is a toolbar with a Pencil icon that will allow you to edit your post

image

You can use Markdown by putting a Triple Backtick on the line above and below your code. That lets you see it like PRE in the post. That also works in Skype. Let me test that below:

I am inside triple backticks
So I show as code

report REPORT,AT(5,22,285,170),PRE(RPT),LANDSCAPE,FONT(‘Verdana’,9,CHARSET:DEFAULT), |
MM
HEADER,AT(5,10,285,16),#ORDINAL(1)
STRING('Some header'),AT(72,6),USE(?String34:2),TRN,#ORIG(?String34),#ORDINAL(2)

1 Like

Thanks, @greg @CarlBarnes,

Appreciate your help regarding the issue that I am facing, I think I understood what you guys explained within the thread, I will implement it into the report syntax and see what happens if i face any issues again though you guys have given me much clear idea, will reply in this thread,

I mainly need to focus on AT attributes, which can solve the issue

Once again thanks guys :slight_smile: @CarlBarnes @greg

I have a small Report Test project specifically for quickly trying various report properties and settings. It comes 2 ways … The original has its own very simple previewer and there’s one that uses the ABC previewer. This is also handy for creating an example to submit bug reports.

1 Like