Crystal reports - different detail section results on different servers - c#

I have a Crystal Reports report that simply has a Blob field(BinaryImage). The reports is in landscape and should simply show 1 label per page.
The problem I recently encountered was that setting the height of my details section has different results on different servers. The report is being generated from a website as a pdf. The code of the website is written in C#(backend) and typescript(frontend).
If I set the height of the detail section to 10 cm the report shows 1 label per page on my development pc(when run locally from code) and on our production server. However when the report is generated from a website hosted on our development server or acceptance server it shows 2 labels per page(1 on top and 1 at the bottom).
Setting the height of the section to 11cm gives the correct behavior on the development and acceptance server but gives an error locally and on the production server: "The page size was not large enough to format the contents of an object"
My development pc has Windows 10(64-bit), the servers have Windows Server 2016(64-bit) as OS.
I've tried comparing the registry keys of Crystal Reports on my pc and the development server but found nothing conclusive. Looking at potential printer options that could influence the behavior also showed no real results.
The report was made in Crystal Reports XI release 2 and all the servers(and my development pc) have "SAP Crystal Reports runtime engine for .NET Framework(64-bit)" version 13.0.20.2399
The code is the same and so is the report. What could cause this different behavior?
Section expert of details section
[edit]
Here are 2 screenshots of the drivers installed on the DEV server and the PRD server:
DEV Drivers
PRD Drivers
The default printer is Microsoft Print To PDF. The driver for this printer is the same across all mentioned servers. The only real differences are the "Remote Desktop Easy print" driver, which has a lower version on the production server, and the "Send to Microsoft OneNote 16 Driver". The "uniFLOW Universal PclXL Driver" is only installed on the development server(and not on the acceptance server) so it should not be the cause.
I did not succeed in trying to get the "Remote Desktop Easy Print" to use the same version as the production server but I did remove it once and the behavior did not change.

This type of problem is usually tied to the print drivers installed on the individual computers. Insure that the servers all have the same print drivers install for whatever printer is set as the default.

Related

Crystal Reports - Prints on 5 end user's machines but doesnt print on the newest member's pc

We have an Internal system that uses crystal reports to print a checksheet.
When I deployed this project, I had to do the following:
install Crystal Reports SP30 32bit runtime
install ODBC for MySQL 32/64bit
Once this was done on the other 5 user's the system printed as intended.
However with the newest member of the team, i have setup the system like all the others but it comes up with the error
File temp error: database connecter error
When I test the connection, it comes back as successful and so I'm just looking for advice on anything else to try within crystal reports / runtime's / Visual studio to try fix this issue
The user is on the same network, on the same OS.
This error is due to crystal reports unable to find database.
Open crystal report file in that system and give database connection to .rpt files once database server established error will be solved. Also open database in that system.
If you establish the connection in that system still you get error than check database profiler for checking query error.
If possible give port number or ip address to database and change connection string accordingly in applications.

Report viewer shows blank report

I have never used reports before and my knowledge is really limited. I have developed an application using C# and SQL Server 2012 Express and one of the features is to show customers account in ReportViewer.
This report gets its data from a stored procedure and for now everything works fine, but the client wants it to work on the desktop of several different machines.
So I made one machine work as a server with the others connecting to it by router and everything in the application works fine except the ReportViewer shows only a blank white report (but only on the client machines -- not the server)
I also tried updating the dataset's connection string in app.config.
What should I try next?

Printing from a console that is started by a Windows Service [duplicate]

I'm building an ASP.NET application that requires printing using PrintDocument method:
PrintDocument.Print()
Printing works properly in development env with IIS express. when publishing it to an intranet IIS server, printing fails, which I think is caused by permission issue for aspnet working process.
I tried to do the following with no success:
I created an application pool in integrated pipeline mode for an admin local user with load user profile option set to true
I moved the application to the new created application pool
I added <identity impersonate="true" username="username" password="*****"/> in web.config file
An error appeared stating that: An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode so I added <validation validateIntegratedModeConfiguration="false"/> to <system.webServer> section.
Any help please?
I think you might be misunderstanding some fundamental concepts here. When you use PrintDocument.Print() you are printing on the server. When you deploy your application in IIS this printing will happen on the server computer that is hosting your application. The reason why you thought your code was working in IIS Express is because you were hosting your application on the same computer as the client browser that was testing it. Also you were running your application under your account which had a printer configured.
You cannot print directly to the client computer from a web application. That would be a big security issue. The best you could do is provide some HTML document using a print media CSS type. Then if the user decides, he might print it in his browser.
If on the other hand you want to print on some printer that is attached to your web server, you will need to configure the Application Pool in IIS to run under an identity that has a printer configured in its profile.
Hopefully I am understanding your question correctly, but I just had some confusion myself with this. Our setup at my work is Windows Server 2008 R2 with IIS 7.
We have a print server as well installed on the same box (not sure if it matters as this is not my area of expert).
Basically, viewing the installed printers using, PrinterSettings.InstalledPrinters I was able to see all the printer names installed on the server.
I attach a debugger to the application process to debug and I can just use the debugger to see this, otherwise you will have to run a loop to print through these. If you run this locally, you will see only the printers installed on your machine. If they are network printers, then the full path will be shown. So determine the path/name the server will recognize the printer as and then set that to the printer name explicitly using the,
PrinterSettings.PrinterName property of the PrintDocument class. This worked for me. Also, my application pool identity is set to NetworkService.
I think the original poster has gotten a lot of flack for their question. If you want to generate .PDFs using GhostScript, for example, you install a printer driver and create a printer for it. You can suppress the Saveas() dialog in many languages by providing one ahead of time. This was feasible in earlier versions of IIS (that may have been less secure), but is harder to do in IIS 8.
I think this issue is caused by IIS inhibiting access to the local printer queue. This is either caused by not being in the NT AUTHORITY\INTERACTIVE group at runtime, or because IIS will put the user, (whomever is running the app pool) in two groups: IIS APPPOOL\, and BUILTIN\IIS_IUSRS.
You can validate all this by looking at the thread permissions using a tool like Sys Internal's Process Explorer.
I have faced same issue and I found the following solution and it worked for me.
1 - Go to printer and setting of system
2 - Select Printer
3 - Go to Printer Properties
4 - Security
5 - Click on Add "IIS AppPool\DefaultAppPool" as object name and click on check name (Default Pool will be your Pool Name)
6 - Give permission Manage This Printer and Manage Document permission.
7 - Restart IIS

How to configure Text to PDF programe as Printer in Server 2012 to be used on server for creating PDF's

My goal is to have a C# web forms app on Server 2012 R2 that converts text (and a picture) to PDF and sends it to a client. I have all of the code, just need to set up the printer correctly. The printer (PDF programe) has to be accesible via client-side browser (it sends the request, server creates the PDF with printer and sends it to client).
Whatever I try, the result is:
Unable to determine the application folder of the printer
'\server-name\Win2PDF'. Reinstalling the printer using the setup
program may fix the problem.
First step is to chose a free Text to PDF programe that works on Server 2012 R2 (because Microsoft Print to PDF doesn't for some reason). The only place my programe mentions the PDF programe is choosing printer name in code:
"PdfSettings.PrinterName = Win2PDF;".
Options so far:
Win2PDF - Best so far. Only adds an extra blank page to the document (acceptable).
CutePDF - Doesn't support .NET
bioPDF - Red watermark on the bottom
PDFsharp - I'd have to implement document-creating logic all over again (a lot of work)
Spire.PDF - Free trial
Win10PDF - Free trial, watermark
Second, I go to Print Managment, Print Servers, Printers, then choose the installed programe (Win2PDF), Properties:
Sharing: check "Share this printer"
Ports: not sure what to select so I enabled printer spooling and also checked an Standard TCP/IP Port (that i created earlier)
Security: I made sure every user there has permission to Print.
When I right click Win2PDF and go to List in directory I get:
The selected printer cannot be published. The directory service is unavalible.
I'm not sure what to do with Deploy with Group Policy.
I also enabled Branch Office Direct Printing for the hell of it.
Third, I made sure Printer Spooler is running. When I go to /System32/spool/PRINTERS I see an empty folder, is that a problem? Some people suggest trying to delete the contents of the PRINTERS folder, but I can't delete nothing. Also, after I installed the Spooling feature the article said to go to Server Manager, Print Services and see if Spooling is on the list (like this) and it's not on my list! Is that a problem?
I have no idea what's wrong or what to try next. Please help!
The answer is trying a different approach. I shouldn't have tried working with the virtual printer (i haven't found a way to make it work).
To create a PDF from code, the best way is using iTextSharp.dll. With that you need a handful of code (not much, but you got to know what you're doing).

How to print report on client side printer using ASPxDocumentViewer?

We are working on 14.1.7 version of Devexpress. We have an application running on a server. This server is not in our local network.
Our project is preparing reports to print after some operation on each cleints in different network area.Think one our customer (client) in USA,
another is in Russia. But they want to use their loacal printer to print report. And we succesfully print report in development enviroment in visiual st 2010 until publish on remote server.
Additionly we add data to report as dynimically. And we get error "No printers are installed".
Thanks for helps....

Categories