Can't use Aspose.Pdf.ReportingServices.dll

Hi,


Yesterday i’ve downloaded the trial version of Aspose.Pdf.ReportingServices.dll… i’ve tested it, and it works for my needs, so i’ve decided to buy it…

The problem is that i don’t know how to use it…

Below are the steps I took to use the product:

(Before buying the licence)
I’ve downloaded the Aspose.Pdf.ReportingServices package and tested it. It works with the watermark in the resultant pdf.

NOTE: when i buy the product i choose to buy the Aspose.Pdf.Product.Family.

(After buying the licence)
Downloaded the license file and copy it to the C:\Program Files\Microsoft SQL Server<Instance>\Reporting Services\ReportServer\bin folder on the server
Added a reference to Aspose.Pdf for Reporting Services to my project.
Copied it to C:\Program Files\Microsoft Visual Studio \Common7\IDE\PrivateAssemblies
Renamed the licence file to Aspose.Pdf.ReportingServices.lic

I basically follow your site: http://www.aspose.com/docs/display/pdfreportingservices/License+Aspose.Pdf+for+Reporting+Services

Now when i do preview in my project and choose export to pdf via aspose pdf generates me a pdf file but I can not open it… It says “Adobe Reader coud not open the pdf because it is either not a supported file type or because the file has been damaged”

What should i do? Or better what do i have to do for this to work?

Thanks.

Hi Hugo,


Thanks for contacting support and sorry for the delayed response.

I have tested the scenario and I am able to
notice the same problem. For the sake of correction, I have logged this issue
as PDFREP-33272 in our issue tracking system. We will
further look into the details of this problem and will keep you updated on the
status of correction. Please be patient and spare us little time. We are sorry
for this inconvenience.

Hi Hugo,


Can you please share the license file which you are trying to use with Aspose.Pdf for Reporting Services. Please note that if an incorrect license is used, resultant file is not generated. You may also have a look over aspose_pdf_rs_exception.pdf file which is generated over C:\ drive. This file states the reasons which might have caused the issue. If possible, please share this document as it will help us in further investigating this problem.

Please follow the steps shared on following link for further details on How to send a license?

We sent you two e-mails with the files requested. Please advise.

Hi there,


Thanks for sharing additional information. We are looking into it and will update you soon.

Best Regards,

Any news???


One month has passed since I spent $1,199 in your product and i still can not use it…

Thanks.

Hi Hugo,


Sorry for the inconvenience faced. We have a good news for you the reported issue has been resolved and fix will be available in upcoming release of Aspose.Pdf for Reporting Services 2.5.2. We will notify you via this forum thread as soon as it gets available for download.

Thanks for your patience and cooperation.

Best Regards,

Hi,


Ok, i’ll wait for the release…

Thanks…

Any news about the new release???

Hi Hugo,


Thanks for your inquiry. Currently, we are in process of testing new release of Aspose.Pdf for Reporting Services 2.5.2. Hopefully we will publish it in start of coming week.

Thanks for your patience and cooperation.

Best Regards,
DO YOU ACTUALLY THINK THAT IS NORMAL ALMOST 2 MONTHS HAVE PASSED SINCE I SPENT $1.199 IN A PRODUCT THAT WORKS ON TRIAL AND THE FINAL VERSION DOES NOT, AND YOU HAVE NOT YET ARRANGED A SOLUTION FOR MY PROBLEM????

AS A CUSTOMER I DEMAND ANSWERS, AND QUICK ANSWERS!!!!!! I'M TIRED OF WAITING AND EXCUSES!!!!

THANK YOU VERY MUCH!!!
DO YOU ACTUALLY THINK THAT IS NORMAL ALMOST 2 MONTHS HAVE PASSED SINCE I SPENT $1.199 IN A PRODUCT THAT WORKS ON TRIAL AND THE FINAL VERSION DOES NOT, AND YOU HAVE NOT YET ARRANGED A SOLUTION FOR MY PROBLEM????

AS A CUSTOMER I DEMAND ANSWERS, AND QUICK ANSWERS!!!!!! I'M TIRED OF WAITING AND EXCUSES!!!!

THANK YOU VERY MUCH!!!

Hi Hugo,


We sincerely apologize for the inconvenience caused and thank you for your patience. There were some issues in the build, so our development team has reworked to fix it. Now it has been fixed and we are in process to publish it and it will be available for download in couple of days.

Once again, we’d like to apologize for the delay.

Best Regards,

Hi Hugo,


We do understand the problem that you have been facing while initializing the license and recently we have been able to resolve this problem. However in upcoming release, we have added the support for SQL Reporting Services 2012 and the testing of this feature is taking a bit more time. Nevertheless, as shared by Tilal, we plan to publish the release within current week. Your patience and comprehension is greatly appreciated in this regard.

Once again, we are really sorry for this inconvenience.

Hi Hugo,


First of all please accept our humble apologies for the delay which has occurred during release publication. Please try using the latest hotfix of Aspose.Pdf for Reporting Services 2.5.3 to resolve license related issue. In case you still face the same error or you have any further query, please feel free to contact.

Hello Nayyer,

As you said, Aspose.Pdf for Reporting Services 2.5.3 have support for SQL Reporting Services 2012 so we have updated our project and i am developing my reports with SQL Server Data Tools from Visual Studio 2010
I have several needs and doubts but let’s start with the most basic…

What i have done doesn’t seem to work so i need urgent support…

1 - Install Aspose.Pdf for Reporting Services to Visual Studio Report Designer

Step 1 - Opened the C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies folder.

Step 2 - Copyed Aspose.Pdf.ReportingServices.dll (downloaded from here and extracted from bin\ReportViewer2010) to that folder.

Step 3 - Register Aspose.Pdf for Reporting Services as a rendering extension. For that i’ve open the file C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies RSReportDesigner.config and added the following lines into the element:

<Extension Name=“APPDF” Type=“Aspose.Pdf.ReportingServices.Renderer,Aspose.Pdf.ReportingServices”/>

Step 4 - Give Aspose.Pdf for Reporting Services permissions to execute. To do this, i’ve located RSPreviewPolicy.config in the folder, open
it and added the following as the last item in the second to outer element:

<CodeGroup class=“UnionCodeGroup” version=“1” PermissionSetName=“FullTrust”
Name=“Aspose.Pdf_for_Reporting_Services” Description=“This code group grants full trust to the AP4SSRS assembly.”>

<IMembershipCondition class=“StrongNameMembershipCondition” version=“1” PublicKeyBlob=“00240000048000009400000006020000002400005253413100040000010001000734cc24bfcebd7aa8c6e2bf8af5c2b95c7a7e6092abb60d68a7d9efde285cf7dce7f354b44cf3064e8ad85bddfe405ad1e51855d9a1367c15cb34529988feeee0c3279caecdb6dfd7f94c5364d2bd282c4f93493d56d33df36f97da8fd71bb7dc4b0e7f1428b926291cdea7cec1085aa9cc0f6771e4fc2f5772603eee3afaaa” />

Step 5 - Reloaded Visual Studio.

After reload Visual Studio 2010, when i preview a report gives me an error:

***Could not load type ‘Aspose.Pdf.ReportingServices.Renderer’ from assembly ‘*** <b><i>Aspose.Pdf.ReportingServices.Renderer, Version=2.5.3.0, Culture=neutral, PublicKey=716fcc553a201e56’.</i>

2 - Install to Report Server
How can i do this working with Sql Server 2012, SQL Server Data Tools from Visual Studio 2010.

3 - License Aspose.Pdf for Reporting Services
I’ve bought Aspose.Pdf Product Family and in my project i am working with aspose.pdf for .NET and aspose.pdf for Reporting Services, so my doubt is how many times do i have to load my license?

In other words check out this example:

My report have a textbox with FullJustify Text Alignment (aspose.pdf.reportingservices).
So i will render the report in my code with something like this:

public List<byte[]> RenderReportUsingWebRequest(string reportPath, Dictionary<string, string> reportInputParameters, string format, string outputFormat)
{
List<byte[]> listArrayBytes = new List<byte[]>();

const string persistStreams = “&rs:PersistStreams=true”;
const string getNextStream = “&rs:GetNextStream=true”;

//Build the initial request for the reoprt server to render the report.
string requestUri = string.Format("{0}?{1}&rs:Command=Render{2}&rs:Format={3}&rc:OutputFormat={4}",
“http://wbf:8090/ReportServer2012/ReportExecution2010.asmx”,
reportPath,
BuildStrParameters(reportInputParameters),
“APPDF”,
“APPDF”);

Console.Out.WriteLine();
//Create a HTTP request which notifies the server to process the page 1 and
// keep rendering the rest of the pages in the server.
CookieContainer cookies = new CookieContainer();
WebRequest request = WebRequest.Create(requestUri + persistStreams);
(request as HttpWebRequest).CookieContainer = cookies;

//Breaks from the loop only when we read an empty stream marking the end of pages.
while (true)
{
//Authenticates the request with the current logged in windows user credentials.
request.UseDefaultCredentials = true;

// Get the corresponding web response for the request object.
WebResponse response = request.GetResponse();

//Read the response stream.
Stream s = null;

MemoryStream ms = new MemoryStream();

int count = 0;
byte[] data = null;
s = response.GetResponseStream();
data = new byte[1024];

do
{
count = s.Read(data, 0, data.Length);
ms.Write(data, 0, count);

} while (count > 0);

// Set the memory stream position to beginning so we can read it from the start.
ms.Seek(0, SeekOrigin.Begin);

if (ms.Length == 0)
{
break;
}

//If not end of pages then add the current stream to the list.
listArrayBytes.Add(((MemoryStream)ms).ToArray());

//Request for the subsecuent pages.
request = WebRequest.Create(requestUri + getNextStream);
(request as HttpWebRequest).CookieContainer = cookies;
}

return listArrayBytes;
}

After this i convert the listArrayBytes to a stream and use the aspose.pdf for .net to replace some text from the pdf. For that i load my license like this:

Aspose.Pdf.License license = new Aspose.Pdf.License();
license.SetLicense(“Aspose.Pdf.Product.Family.lic”);

So, my doubt is, before i call the method RenderReportUsingWebRequest() do i have to load a license like this?

Aspose.Pdf.ReportingServices.License license = new Aspose.Pdf.ReportingServices.License();
license.SetLicense(“Aspose.Pdf.Reporting.Services.lic”);

I hope it was clear with my questions, otherwise we can talk via skype or something. I think it would be easier to clarify my doubts.

Thanks in advance.

Hi Hugo,


In one of my earlier posts, I stated that we are working on preparing the release which will be compatible with SQL 2012, however we are still working on testing the component compatibility with SQL 2012 and ReportViewer 2012. Due to your urgency related to license initialization issue, we shared the hotfix. And as soon as we have some further updates regarding support for SQL 2012, we would be more than happy to update you with the status of correction.

Now concerning to license initialization, license is validated when first object of our components is created i.e. Aspose.Pdf for .NET or Aspose.Pdf for Reporting Services. You only need to call the license initialization once in your application life cycle (which is usually at the beginning of application) and you need to explicitly initialize the license for each product.

We apologize for this confusion and inconvenience.

Hello Nayyer,


Do you have an idea how long will it take to be available the release wich will be compatible with sql2012?

About the license, i still have a doubt… I only have one license, the one that you have send me… Aspose.Pdf.Product.Family.lic so if i need to explicity initialize the licence for each product, when i use the product PDF for .NET this license with this name works great, but when i render a report in my code i’m using a different product, pdf for Reporting Services, and here you have a note that says:

Please note that that supported license file names are"Aspose.Pdf.ReportingServices.lic" or “Aspose.Total.ReportingServices.lic” and “Aspose.Total.Product.Family.lic”. If license file has any other name, please rename it.

So in this case in my code when i use the product PDF for Reporting Services do i have to use the same license with a new name “Aspose.Pdf.ReportingServices.lic” and load it again?

Thanks,
Best Regards,
Bruno Faria

HugoPacheco:
Do you have an idea how long will it take to be available the release wich will be compatible with sql2012?
Hi Bruno,

We hope to share some definite news regarding the support for SQL 2012 within current week.

HugoPacheco:
About the license, i still have a doubt… I only have one license, the one that you have send me… Aspose.Pdf.Product.Family.lic so if i need to explicity initialize the licence for each product, when i use the product PDF for .NET this license with this name works great, but when i render a report in my code i’m using a different product, pdf for Reporting Services, and here you have a note that says:

Please note that that supported license file names are"Aspose.Pdf.ReportingServices.lic" or “Aspose.Total.ReportingServices.lic” and “Aspose.Total.Product.Family.lic”. If license file has any other name, please rename it.

So in this case in my code when i use the product PDF for Reporting Services do i have to use the same license with a new name “Aspose.Pdf.ReportingServices.lic” and load it again?
You need to separately initialize the license for each product and when using Aspose.Pdf for Reporting Services, please rename the license file to names suggested in product documentation. Please note that Aspose.Pdf for .NET does not require any particular format for license file name so you can update the file name and use with both components. In case you encounter any issue, please share the license file by following instructions specified over How to send a license?

HugoPacheco:
As you said, Aspose.Pdf for Reporting Services 2.5.3 have support for SQL Reporting Services 2012 so we have updated our project and i am developing my reports with SQL Server Data Tools from Visual Studio 2010

After reload Visual Studio 2010, when i preview a report gives me an error: Could not load type ‘Aspose.Pdf.ReportingServices.Renderer’ from assembly ‘Aspose.Pdf.ReportingServices.Renderer, Version=2.5.3.0, Culture=neutral, PublicKey=716fcc553a201e56’.
Hi Bruno,

Thanks for your patience.

We just have published Aspose.Pdf for Reporting Services 2.5.3 release and now you can configure Reporting Services using MSI installer. In case you encounter any issue, please try manually configuring the Reporting Services as specified in documentation over Install Manually

HugoPacheco:
2 - Install to Report Server
How can i do this working with Sql Server 2012, SQL Server Data Tools from Visual Studio 2010.
I have tested the scenario over Windows 7 (X64) with SQL Server 2012 and as per my observations, the reports are properly being generated. I have also tried using the component with MS Report Viewer 2010 as well as MS Report Viewer 2012 and reports are properly being generated.

HugoPacheco:
3 - License Aspose.Pdf for Reporting Services
I’ve bought Aspose.Pdf Product Family and in my project i am working with aspose.pdf for .NET and aspose.pdf for Reporting Services, so my doubt is how many times do i have to load my license?

When generating reports with Aspose.Pdf for Reporting Services, you need to initialize the license before rendering the report. In case you are manipulating PDF files using Aspose.Pdf for .NET, you also need to separately initialize the license for Aspose.Pdf for .NET.