Can't use Aspose.Pdf.ReportingServices.dll

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.

The issues you have found earlier (filed as PDFREP-33272) have been fixed in Aspose.Pdf for Reporting Services 2.5.3.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Hello Nayyer,


I’ve downloaded Aspose.Pdf for Reporting Services 2.5.3 but still cannot use it with sql server 2012…

The msi installer doesn’t work so i’ve tried to install it manually…

In the downloaded folder of Aspose.Pdf for Reporting Services 2.5.3 we have folders to rs2000, rs2005 and rs2008… where is the dll for rs2012???

I’ve tried to put the dll of folder rs2008 in directory C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer\bin like you said here.
Also changed the

rsreportserver.config


and

rssrvpolicy.config

<CodeGroup
class=“UnionCodeGroup”
version=“1”
PermissionSetName=“FullTrust”
Name=“Aspose.Pdf_for_Reporting_Services”
Description=“This code group grants full trust to the Aspose.Pdf for Reporting Services assembly.”>
<IMembershipCondition
class=“StrongNameMembershipCondition”
version=“1”
PublicKeyBlob=“00240000048000009400000006020000002400005253413100040000010001000734cc24bfcebd7aa8c6e2bf8af5c2b95c7a7e6092abb60d68a7d9efde285cf7dce7f354b44cf3064e8ad85bddfe405ad1e51855d9a1367c15cb34529988feeee0c3279caecdb6dfd7f94c5364d2bd282c4f93493d56d33df36f97da8fd71bb7dc4b0e7f1428b926291cdea7cec1085aa9cc0f6771e4fc2f5772603eee3afaaa”
/>

Then to test it i’ve open the report manager and select my report… then select the pdf via aspose.net format but cannot open the pdf file… the error is: adobe reader could not open report because it is either not a supported file type or because the file has been damaged.

I think this is happen because i’m using the wrong dll…

What should i do??


Can you please help me with this question?? It’s very urgent for me to solve this situation…


Thanks.

Here we go again…


2 weeks to answer to a costumer issue??

I’ve bought this product in april, we’re in august and i still cannot use it properly…

Do you think it’s normal???

Hi Hugo,

I’m support team lead at Aspose and I’m extremely sorry for the inconvenience you faced due to this delay.

No. This is not normal; we do make sure to reply to our customers the earliest possible usually within a working day. We’re looking into this to see why your query was missed. A support team member will be with you shortly.

Please accept our sincere apology for this and I assure you that you won’t face any such issue in future.

Regards,

Hi Bruno,

First of all please accept my humble apologies for the delay while replying.

As I have shared earlier, I have tested the scenario using SQL Server 2012 (X64) over Windows 7(X64) where I have used Aspose.Pdf.ReportingServices.dll present under SQL2008 folder and I have been able to render the RDL file into PDF format using Aspose.Pdf extension. However concerning to the error which you have been facing, it might be related to the report which you are trying to export. Can you please share the source file (.RDL) so that we can test the scenario at our end.

We are really sorry for this delay and inconvenience.

Hi.


Sorry for the delayed answer but i’ve been out of office last week.

The same rdl with sql server r2 works perfect so the problem is not about the rdl file.

Can you please explain step by step what do i have to do, to:
Thanks.

Hello,


The time limit to deliver the developments to our clients will be on september 7.
I will be out of office tomorrow and the day after tomorrow and i’ll be back on september 2.
Once for all i really hope and appreciate that you help me with this question that creeps since april, because i gave my word to our clients that this problem will be solve, otherwise we will have serious problems.

Recapitulating, i’ve used the dll under 2008 folder with Sql Server 2008 R2 (X64) with windows 7 (X64) and works perfect. The same dll with Sql Server 2012 (X64) with windows 7 (X64) does not work.

The problem is not about the rdl file because otherwise this won’t work with 2008 R2.

So ONE MORE TIME, my question is very simple:

What have you done to install to report server and to install to visual studio report designer to get this works with sql 2012??

Step by step please…

Thanks.



Hi Bruno,


I am again preparing the fresh SQL 2012 Reporting Services instance over my end so that I can again test the scenario of rendering .RDL file to PDF format using latest release of Aspose.Pdf for Reporting Services. I hope to complete my testing by today and will post my findings within this forum thread. We are sorry for your inconvenience.

Any news about your findings???



Hi Bruno,


Thanks for your patience.

I have again tested the scenario where I have used Aspose.Pdf.ReportingServices.dll from SQL2008 folder and have tried it using with SQL 2012 (X64) Reporting Services running over Windows 7 x64 and I am still unable to replicate the problem. The reports are properly being generated.

Can you please share the Aspose.Pdf.Exception.pdf file which might be getting generated over the root of C:/ drive when you are trying to use Aspose.Pdf.ReportingServices.dll with SQL 2012. This file contains the details regarding the exception/error which might be occurring . We are really sorry for this inconvenience.

Hello,

I finnaly figured out why this don’t work… Because of [this](http://www.aspose.com/community/forums/494340/reporting-services-export-to-pdf-image-problem/showthread.aspx#494340)

Because i’ve got images on my report!!! What extraordinary thing!!! Images in a report…

What i cannot understand is, how can you put a product on sale (Supposedly compatible with SQL2012) if not a single image works in the report??? How is that possible??? How???

There’s no excuse for that… A simple test, like create a new report, add an image and export to pdf via aspose, doesn’t works???

What kind of tests have done your team???

What bothers me most, is that customers find bugs and then they have to be waiting months that they are fixed… Until there we cannot use what we have bought not for 10 dollars but for more than 1000!!!

SHAME ON YOU!!!

Now, if i may, i have to go to justify this problem one more time to my boss and to our clients!!!

Thank you very much!!!

Hi Bruno,

First of all please accept our humble apologies for the delay and inconvenience which you have faced due to the issue occurring in Aspose.Pdf for Reporting Services. The forum thread which you have referenced above, contains the list of issues occurring when exporting report containing images where the colors of image are lost/not correct in resultant PDF file. Also it contains the issue related to Text rendering in resultant PDF file. However in this current thread, we have been discussing the scenario where you are not able to use Aspose.Pdf for Reporting Services with SQL 2012.

HugoPacheco:
What i cannot understand is, how can you put a product on sale (Supposedly compatible with SQL2012) if not a single image works in the report??? How is that possible??? How???

From time to time, we keep on introducing changes in our component and for above stated image related issue, the problem might have occurred during to some recent changes. I am sure in earlier release versions, we have been exporting images into resultant PDF files.

HugoPacheco:
There’s no excuse for that… A simple test, like create a new report, add an image and export to pdf via aspose, doesn’t works???

Before a version is released, the team tests the components and ensure that all the features work correctly. For image related issue, I think the file which team has used during regression testing, the component would have worked for that scenario and have caused problems with the image placed in your sample report.

The team is definitely looking into above stated issue and I hope these problems will be resolved shortly. Once again, we are really sorry for the inconvenience which you have been facing.