on 10-14-2015 11:02 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
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
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
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
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.