Microsoft reports and crystal reports could not be downloaded as PDF file - asp.net-mvc

when ever i try to download the reports in my MVC application , it can't be downloaded as PDF file but it can be downloaded as excel , word and XML file
please any solution

This is probably a Browser behavior (open instead of save as pdf) issue.
Consider providing more details in your question.

Related

Delphi: navigate2 with pdf files

I'm using Delphi 10.4.2 and I want to use the navigate2 method to open a pdf file in a browser.
This is the simple code:
br.HandleNeeded;
br.Stop;
br.Navigate2(URL);
where URL is the file path.
I noticed that navigate2 works and displays some files (.text, .html...) but not the .pdf files.
Has anyone ever had a similar problem? How can I fix? And, above all, why does it occur?
I have the Acrobat Reader additional component in the browser.
it seems a problem related to Acrobat Reader. It works with an other PDF reader.

OpenERP Reports always in PDF

I'm new in OpenERP and I'm starting to know the application.
I hope you allow me to post this kind of questions on the forum.
Whenever I issue any listing or report in OpenERP, the application generates a PDF file to be opened or downloaded. Is there any way to make these listings and reports directly into a browser window so I can print them directly from the browser instead of download/open PDF files?
Thank you very much
Paulo Matos
[https://code.launchpad.net/~openerp-india/openerp-india/web_pdf_viewer-pga
You can use this module to open directly in browser.
Just copy this module to your web/addons folder of openerp web
Hope its work

Why does the content type of an uploaded excel file changes to application/octet-stream on mac in ASP MVC 4.0?

I'm having a little problem! I'm designing an asp mvc 4 application for a client which should import and process an excel file. To process the excel file I use the C# version of the NPOI framework.
My client uses mac and I use windows.
Everything works fine on windows but when my client tries it on his mac, it does not work anymore. After doing some searching I found that the content type of the uploaded file was "application/octet-stream" when uploading from mac (opposed to "application/vnd.ms-excel" when uploading from windows).
We use the exact same file, the only difference is that my clients file is saved on a mac and mine on a windows pc (we both got the same file from google docs).
It became weirder when he was experiencing the same error when he tried it on a windows pc with the file which was saved on mac.
Does anybody have an idea on what is going on? Or how I can get my NPOI processing working when the content type is "application/octet-stream"?
The browser can freely choose what content type to send. It could even send you "fluffy/bytes" if it wanted and you can't do anything about it. It appears that Safari on Mac does not know what an Excel file is so it does not send the Excel content type.
What is NPOI? Why does your application require that content type to be set? You can recognize that this is an Excel file by looking at the file extension that was posted. If neither content type not extension were posted (entirely possible) you can only guess by the file contents.

Opening a TIFF File from the Web Browser

I checked previous questions here on SO but I think I want my functionality to work a little different. I understand that .tif files are not natively supported in Internet Explorer and that an extension, such as AlternaTIFF, are available to remedy this. However, I would like the dialog to show up where the user can either save/open the file on the client side. I know that MS Windows Picture and Fax Viewer can open them, no problems.
The files are located on our servers and this will be an intranet site. Currently, I have a link to the files populate in the view but again, I'd like that option for the user to Save/Open the file.
I'm using MVC, which I'm a little unfamiliar with, and can't seem to figure this one out. Thank you.
You can do an action that returns a tiff by changing the headers so when someone clicks the link the file will get downloaded or using FileResult.
Example with FileResult (i find it easier): http://www.dotnetcurry.com/ShowArticle.aspx?ID=807
For saving them is just like uploading any file with MVC. This post can be useful http://haacked.com/archive/2010/07/16/uploading-files-with-aspnetmvc.aspx
My advice is that you convert them to .jpg or .png when uploaded using GDI+.
//You first upload the tiff to the server like the post above explains
//And then open and convert it to .JPEG
Bitmap bm = Bitmap.FromFile("mypic.tiff");
bm.Save("mypic.jpg",ImageFormat.JPEG);
And if you already have the urls of all the tiffs, you can always do a console app to convert all of them. Even if you need to use tiffs its a good idea to have .jpg versions to show on the web. You can even resize them to create previews and save some bandwith too! :-)

Opening WI attachment without downloading it first in TFS 2010

Does anyone know how I can open an attachment from a work item without having to download it first?
When I double click the attachment, the explorer is opened and the file is downloaded and only then I can open it.
You can't as far as I'm aware as the IDE will get the attachment from the TFS server using a web service and thus opens a browser and uses IE for this.
Please see this related item for more info: Open TFS Work Item Attachment in Image Viewer not Web Browser

Resources