cancel
Showing results for 
Search instead for 
Did you mean: 

Label height wrong

thomas_schoch2
Explorer
0 Kudos

Since we moved to Crystal 13 all the label reports are not printing correctly anymore.

If we have a report (e.g. Herma 4450) printing 3x9 labels the last label on the page is almost half a label height off.

Has anything changed in printing labels, do we have to recreate all the reports?

Thomas

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Thomas,

What patch are you using?

What Version of Vs are you using?

What printer are you using and is it the latest driver update?

Is their printer driver .NET certified?

Is the printer a thermal, laser or ???? type

Did you design the report using that printer as your default printer and specified in the Page Setup properties?

What version of the Report Designer did you create the report in?

Don

thomas_schoch2
Explorer
0 Kudos

Hi Don,

we created the reports a few years back but also tried to with a new report that we built from scratch today in VS.

Runtime is 13.0.9

VS is 2010, runtime is framework 4

Printed on an OKI MC 860 PCL, laser and on different client printer of unknow brand

Don't know about .NET certification of the driver.

We have been using these reports for nearly 10 years, our application was running on framework 2.0 and Crystal XI R2.

We recently upgraded our app using framework 4 and crystal 13.0.9 and since then the problems have started.

Thomas

0 Kudos

Hi Thomas,

Try SP 12, there have been some updates to the Printing API's since SP 9.

Looking for that printer I see their latest driver version is:

PCL Universal Driver for Windows - Version 1.1.9 - 1.1.9

Possibly that may help.

Does it print properly if you print from CR Designer?

Was your XI R2 also using .NET runtime or the RDC?

Don

thomas_schoch2
Explorer
0 Kudos

Hi Don,

it looks like printing from the CR Designer in VS works fine.

Using runtime version 13.0.12 doesn't help.

XI R2 used the same code to interface with Crystal (.NET runtime).

Since all the customers have different printers we set the printer and papersource at runtime. Could this have an influence?

The labels I'm testing with  are Herma 4450, 3.2x7cm, 3x9 labels.
When I print from the designer the vertical distance between two labels is exactly 3.2cm. When I print them from our application the height of a label is only 3.1cm. If you print 9 labels high this makes the last label move up by about 1cm. Printing on A4 papersize.

In the designer the labels are defined as 6.999x3.198cm. If you define them any wider/higher CR can't fit 3x9 labels on the page.

Thomas

thomas_schoch2
Explorer
0 Kudos

Anything new on this issue?

Thomas

thomas_schoch2
Explorer
0 Kudos

knock knock

0 Kudos

Hi Thomas,

Been busy, Forums is the bottom of the list of things to do....

See if this KBA helps:

http://search.sap.com/notes?id=0001563479&boj=/sap/bc/bsp/spn/scn_bosap/notes.do?access=69765F6D6F64...

Don

thomas_schoch2
Explorer
0 Kudos

Hi Don,

we've tried a few things in our app and still have the same bad results.

If we print from Crystal Designer it looks like everything is fine, have to do some more testing with different label type though.

What approach should we take now? I just can't believe that things have changed so much when moving from CR 11 to CR 13 and nothing has changed in our app.

End of year is coming up and most customers will want to print label for christmas cards etc. so we're under some pressure here.

Thomas

0 Kudos

Actually a lot has changed, CR add the Dissociate in the Page Setup as well as you can now set orientation for each section.

Try updated printer drivers and update the report to a current version so it can use the new API's in CR for .NET.

Do NOT set the page to No Printer, there are limitations in USP10 that is used to render the page and differences between CRD using GDI and .NET using GDIPlus.

You also try using the PDF output format, change the setting in the Viewer properties.

Another option is to export to PDF and then print the PDF file.

Don

thomas_schoch2
Explorer
0 Kudos

Hi Don,

I've tried everything and had no luck.

I have created a small sample app which prints out our report. Can I mail this app to you? I couldn't attach it here.

It's complete with a small sql database and original report we are using.

Thomas

thomas_schoch2
Explorer
0 Kudos

Don,

can you give me an example on how to load a report (and possibly change datasource location) programmactically using RAS so I can see if this makes any difference.

I got completely lost on SAP website and just could not find the documentation.

Thomas

former_member183750
Active Contributor
0 Kudos

The utility attached to this KBA, will write the code for you. See if that will help.

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

thomas_schoch2
Explorer
0 Kudos

Ludek,

I can't get my sample to run.

When loading the report I always get this error: the public member Load for the type ISCRReportDocument was not found.

Just to show you again what the problem is: in CR13 the labels printed seem to get sized down compared to CR XI R2. Noone has so far been able to tell me why. We only changed from framework 2.0 to 4.0 and use CR13. All the code in our app is the same.

thomas_schoch2
Explorer
0 Kudos

Ignore my previous comment, sample app is now running.

But the labels still print wrong.

Please see scans of the same data printed with the same report with CRXIR2 and CR13.

former_member183750
Active Contributor
0 Kudos

Sorry Thomas. Call me blind, but I don't see a difference between CRVS and CR XI R2. I just don't see a difference. All I can do is go by your initial description:

If we have a report (e.g. Herma 4450) printing 3x9 labels the last label on the page is almost half a label height off.

Differences such as these are typically caused by printer drivers. Can you check if there are any updates for the printer driver used to print the reports?

- Ludek

thomas_schoch2
Explorer
0 Kudos

I you print out both images you will see that the text of the labels is not on the same position on the sheet. And this is exactly what the problem is.

If you also look at the image with our logo the label at the top  is printed with the same report. in CR13 everything is printed a lot smaller. Depending on the label size this makes a big difference.

This cannot be caused by printer drivers. Both were printed on the same printer with different framework/cr version.

The problem also occurs on all client machines and they also have received a new crystal version/framework only.

Thomas

former_member183750
Active Contributor
0 Kudos

Hi Thomas

In order for us to proceed, I need you to ensure that the latest updates have been applied to the printer driver. This is the 1st step in troubleshooting these issue. No 1st step, no go to second step...

- Ludek

thomas_schoch2
Explorer
0 Kudos

Hi Ludek,

we have checked the printer drivers. They are all up to date.

Thomas

former_member183750
Active Contributor
0 Kudos

Hi Thomas

So I can test the issue here, what is the printer driver and version of the printer driver you are using? We are really interested in only the one specific printer driver that is printing the labels.

- Ludek

thomas_schoch2
Explorer
0 Kudos

Printer is OKI MC860, printing on A4 paper

Thomas

thomas_schoch2
Explorer
0 Kudos

Any news on this issue?

Thomas

former_member183750
Active Contributor
0 Kudos

Refering to this from Nov. 3:

Since all the customers have different printers we set the printer and papersource at runtime

Is the OKI printer the only one with the issue?


Can you attach the report with saved data? (to attach click on the "Use advanced editor" link).

- Ludek

thomas_schoch2
Explorer
0 Kudos

Hi Ludek,

attached is the report we use. Please rename the file to .rpt.

Problem occurs on all printers we tested.

Thomas

0 Kudos

Thanks Thomas,

I open the report in CRD and I see you have not checked on Dissociate, this is a must so it does specifically look for the your printer, or the one saved in the report when you last saved it.

In my app I get this info:

What this is telling me is the printer was not saved in the report. It did save the custom paper size though, 2 digits only. CRD shows 3 digits.

So in CRD check on Dissociate and select the custom paper size you defined in the printer:

And save the report. Now when Printing SDK will look for that paper size be defined in their printers.

Read the Wiki's Ludek and I created for printing custom paper sizes.

Next, open the report in CRD and click the print from the file menu and you get this screen:

Check off Center Page and apply, then cancel then save the report.

Note I've selected the User Defined paper size in from the printer.

Now when you look at the various report properties using the SDK you'll get this info:

Once you update the report using the SDK you can get this info and set it up accordingly using the SetPrinter API.

rptClientDoc.PrintOutputController.ModifyPrintOptions(newOptsCloned);

rptClientDoc.PrintOutputController.ModifyPaperOrientation(CrPaperOrientationEnum.crPaperOrientationLandscape);

rptClientDoc.PrintOutputController.ModifyPrinterName(newOptsCloned.PrinterName);

rptClientDoc.PrintOutputController.ModifyUserPaperSize(newOptsCloned.PageContentHeight, newOptsCloned.PageContentWidth);

rptClientDoc.PrintOutputController.ModifyPageMargins(newOptsCloned.PageMargins.Left, newOptsCloned.PageMargins.Right, newOptsCloned.PageMargins.Top, newOptsCloned.PageMargins.Bottom);

There is also a CopyTo and CopyFrom API in both ClientDoc and ReportClientDoc.

The other thing you should or may need to adjust is the top and bottom margins, the framework tries to scale the page to fit, those margins you are using may be the cause.

So the problem is when using the Print button from our Viewer it use the Framework to to the printing, Changes in CR 2008 that allow you to set orientation for each section is why this changed.

Printing from CR Designer uses the DEVMODE structure, Printing from .NET app uses the System.Printer structure and it's not quite the same as DEVMODE. Nothing we can do about that, it's the way .NET prints.

If changing the reports with above options does not work then create your own print button and use the ReportClientDocument to do the printing. It's basically the same as the ActiveX printing in XI R2 and CR Designer.

The other thing I noticed is from your description you basically "customized" the printer properties in CR Designer to fit these labels, it's odd that you specify A4 paper size but adjust the margins and paper size to kind of fit the paper and output?

Can you clarify, are these labels on a 81/2 by 11 sheet of paper or are they on an A4 size paper? You should simply set the paper size to what they actually are and try not to find one that is "close"

Unfortunately I don't have an OKI printer to test on and none of our corporate printers allow custom paper sizes, just the generic paper sizes.

So have a look at your settings, what used to work is not a valid argument now because lots of changes in our printing API's.

Also, get the latest CR Designer patches, it should have updates so the rpt file has more info saved in the file that can be used in your logic to select the correct printer and properties.

Thanks again

Don

thomas_schoch2
Explorer
0 Kudos

Hi Don,

I have installed the latest designer patches and version is now 14.0.10.1493 RTM and changed the report like you described above.

Papersize is always A4. In Switzerland this is the standard papersize. We are not using a custom size paper, just A4.

I have seleted A4 papersize in the report and set the margins to 0. Otherwise I cannot define the labels as 3.2cm x 7cm to fit 3x9 lables on a A4 page.

Problem still remains the same, even in designer.

'...and use the ReportClientDocument to do the printing': Can you send me a sample on how to do this. I only know the .NET-way to print the reports.

Thomas

thomas_schoch2
Explorer
0 Kudos

'...and use the ReportClientDocument to do the printing': Can you send me a sample on how to do this. I only know the .NET-way to print the reports.

Thanks Thomas

thomas_schoch2
Explorer
0 Kudos

I finally found a solution to this problem:

Add this registry key and all is well:

[HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\DesignerOptions]

"dealWithMinimalMarginsWhenPrinting"="0"

on a Win64 machine the key is:

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\DesignerOptions]

"DealWithMinimalMarginsWhenPrinting"="0"

Thomas

ido_millet
Active Contributor
0 Kudos

Thomas, thanks for sharing this info. Can you provide a link to the source?

SAP folks, could you provide a Wiki or some centralized document for all registry options that apply to CRVS?

thomas_schoch2
Explorer
0 Kudos

What source do you mean? I found the answer by googling and came up with this registry entry in one of the discussions on the forum.

Thomas

Answers (0)