cancel
Showing results for 
Search instead for 
Did you mean: 

ActiveX PrintControl Page Size Issue

Former Member
0 Kudos

Hi Everybody,

We have developped an ASP.NET Application that shows Reports with the CrystalDecisions.Web.CrystalReportViewer (using the SBOP BI PLATFORM .NET SDK RUNTIME 4.0 SP11 WINDOWS 32B64B).

The Reports are stored on a Crystal Server 2011 SP11.

We are Using the ActiveX PrintControl to print the reports.

We have a few Reports that are in A5 page size. We want the PrintControl to be set to A5 by default for those Reports.

The Printcontrol detects the Page Size of the reports but the default Printer Size remains in A4:

Is there any possibility to set the default page size of the printer to the page size of the report (so the user doesn't have to change the Printer page size each time he wants to print a report)?

Thanks for your help

Regards,

Adrian

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Adrian,

Look in the SDK help file, there are API's for setting the printer properties called CopyTo and CopyFrom.

You can create your own print button and use those to alter the printer settings.

The default using the Viewers Print Button uses PrintToPrinter API and it's basic behaviour is to use the default printer settings.

You could try setting your default printer to use A5 and then if that works Add a printer and use the same one and set the default paper size to A4, users can then select between the 2...

CR for VS has the ability to use PrintOutputController to do the printing, same UI and CR Designer when printing. I'll check with DEV to find out when and if that ability is going to be moved into BOE SDK. Will require you to upgrade to 4.1 likely.

Don

Former Member
0 Kudos

Hi Don

Thanks for your answer. Unfortunatly it wasn't helpfull for us.

We could now isolate our problem.

If we have a report with parameters, the input dialog is coming up and we set the values, then the paper size in our print dialog is set correctly (A5, see also attached file: PrintControlCorrect.PNG).

But if we have a report without parameters, the paper size is always set to the printers default (A4, see also attached file: PrintControlIncorrect.PNG).

Do you have an idea, how we can set programatically the paper size like the parameter dialog does?

Thanks already for your answer.

Cheers

Meta

0 Kudos

Hi Meta,

That makes absolutely no sense..... Parameters have nothing to do with the default printer properties.

Although it may force a Verify of some kind....

Can you attach both reports so I can have a closer look at them? I'll run them through my test app and see what is happening...

Use the advanced editor and rename the reports to *.txt.

Thanks

Don

Former Member
0 Kudos

Hi Don

As an attachment you see the two different reports, once with parameter and once withour.

Those are test reports because we can't upload real ones.

But we see the same mistake.

We added also our source code how we are using the viewer in our application.

Thanks for having a look on it.

Cheers

Meta

Former Member
0 Kudos

Hi Don

We aren't able to upload the reports when we renamed them to *.txt.

We also tried some other formats and it didn't work.

The error message is always 'The content type of this attachment is not allowed.'.

Do you have any other idea, how we can upload the reports?

In case this helps a little bit how our reports look like there are some screenshots of the designer.

Report with parameter:

Parameter definition:

Report without parameter:

Page setting of both reports:

Cheers

Meta

0 Kudos

When I type *.txt the star (*) is a wild card and means use the name of your report and does not mean to rename the report file to "*.txt"

For example, my report is called "dons.rpt", so when I rename name it to "*.txt" it actually gets renamed to "don.txt"

Hope that is clear now....

Good luck

Don

Former Member
0 Kudos

Hi Don

Thanks for your response and sorry for being not clear about the names of our reports.

I also used the star as a wild card in my response.

We've done the following with the names of our reports:

I renamed our reports from "TestReportWithoutParameter.rpt" to "TestReportWithoutParameter.txt" and from "TestReportWithParameter.rpt" to "TestReportWithParameter.txt". And with those names it wasn't possible to upload them.

I tried it again today, but I was still not successful. Is there some kind of content validator (check) based on the extension of the file? If there is some and because the extensions allowed for upload are limited there is no way to upload something with an .rpt content.

So I have still the same question:

Do you have any other idea, how we can upload the reports?

Cheers

Meta

former_member183750
Active Contributor
0 Kudos

Try a different browser. Try a different computer.

- Ludek

Former Member
0 Kudos

I'm trying it now with a different browser.

Hopefully it works...

Cheers

Meta

Former Member
0 Kudos

Hi

I haven't heard anything from you so I just wanted to ask if you could reproduce our problem with those two reports?

And if you have any suggestion how we can solve it?

Cheers

Meta

0 Kudos

We were wating for an update from you. I guess it did not work then...?

Only reason I can think of is the printer is not installed locally. I'm getting a VM image runnig and with try it.

Don

Former Member
0 Kudos

Hi Don

Sorry I didn't reply but I wasn't aware you were waiting for an answer.

But I can tell we have good news.

With the new SP (Crystal Server 2011 SP12) our problem is resolved.

Cheers

Meta

Answers (0)