0
votes

I'm trying to export a Crystal Report to PDF (or .doc or something else that Crystal Reports support) and then put it in my file system with a size smaller than A4. This is being done through Visual Studio 2010. I want to do this because the report has an image that is not that big and thus creating an A4 page with that small image would be ugly. If the size could be A5 or something similar, that would be great.

Thank you in advance,

Rafael Valente

1
As far as I know, Crystal Reports does not allow you to customize the format of the PDF created when you export it.Brandon Kramer
Hello Brandon. Thank you for your response. It doesn't need to be in PDF. I can export in .doc as well.Rafael Valente
I think you can define paper size in printing but not in exporting, no matter the exporting file type. You can look here but I didn't find something useful msdn.microsoft.com/en-us/library/aa645701(v=vs.71).aspxjambonick
Hello jambonick. I couldn't resolve my issue using Crystal Reports but i did solved my problema. I'm going to post the solution. Thank you!Rafael Valente

1 Answers

0
votes

So, i couldn't solve this issue with Crytal Reports after spending almost 2 days looking for a solution. Then i started to look for other reporting solutions, like SSRS. In Visual Studio, we can actually create a report with a .rdlc format (Add --> New Item --> Reporting --> Report). This format allows you to work with Report Viewer through VS and do the workaround to export succesfully to PDF (or other reading/writting format like .doc) or even an image.

This is my code:

enter image description here

I hope this is helpfull and can prevent other people for going crazy with things like this.

Best regards, Rafael Valente

EDIT: This code is written in a normal class in VS. If you're using a .apsx item, then you can change the code and try to work with HTTP Response collection.