.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Export report directly to PDF

Posted By:      Posted Date: September 21, 2010    Points: 0   Category :Sql Server

I have a report that is generated directly as a pdf report using the System.Web.Services.Protocols.SoapHttpClientProtocol. When the report renders as a pdf document soem of the cells that have TextAlign set to Right are actually showing with the TextAlign as Left. Is there something in the rdl file that is causing this or is this a bug when rendering directly as pdf?

View Complete Post

More Related Resource Links

How can I export the crystal report to PDF directly?


I am developing web application using csharp on visual studio 2008.I am able to generate  reports, but I want just to export or generate reports in pdf only. How can I achieve this?
The code I am using is below. But it is not working. Please help

     myClass = new Dbcon();

        this.conn = new System.Data.OracleClient.OracleConnection();
        this.conn.ConnectionString = "user id=HRddd;data source=XE;password=cfvvv";
        //Database Connection
        ConnectionInfo ConnInfo = new ConnectionInfo();
            ConnInfo.ServerName = "";
            ConnInfo.DatabaseName = "XE";
            ConnInfo.UserID = "HRddd";
            ConnInfo.Password = "cfvvv";
        // For Each  Logon  parameters
        foreach (TableLogOnInfo cnInfo in this.CrystalReportViewer1.LogOnInfo)
            cnInfo.ConnectionInfo = ConnInfo;


        //CrystalReportViewer1.ReportSource = oRpt;
        if (bool.Parse(myClass.table_exists("COUNTVIEWDE", conn).ToString()) == true)
            myClass.DbNonQuery("DROP VIEW COUNTVIEWDE", conn);
         sql = "CREATE VIEW COUNTVIEWDE AS " +

RDLC Report Hide Export Option

The article RDLC Report Hide Export Option was added by mandandeo on Sunday, August 15, 2010.

protected void ReportViewer1_PreRender(object sender, EventArgs e) {DisableFormat(ReportViewer1, "Pdf"); }protected void DisableFormat(ReportViewer viewer, string formatName) {const System.Reflection.BindingFlags Flags =System.Reflection.BindingFlags

Cannot export from a Report in SharePoint integrated mode in a server hardend environment


We have installed Reporting Services 2008 integrated with MOSS with SQL Server 2008 on a 64 bit platform.

The environment has worked fine in test (but the servers are not hardend).

With the production environment, any attempt to export from a report into another format (eg excel, tiff etc) results in an unexpected error within SharePoint requiring closing the browser and reopening.

There are no details behind the error. We can also find no traces of the error within any of the logs (SharePoint, Reporting Services, Windows event log etc)

When the report is opened directly from Reporting Services (ie http://servername:8080/reportserver) the report exports fine. Similarly, if the report is opened directly from Report Builder 2, or through opening Report Builder 2 from SharePoint there is no issue. This issue only happens when the report is invoked directly through SharePoint.


We can only assume that this issue has something to do with server hardening/UAC as we have

VS2008 BIDS Report export to Excel not grouping the same as VS2005

I have a report that I created in VS2005 BIDS and got it to export to Excel to group/subtotal the same way it does in the BIDS report window.  Now I have copied the .rdl files to a VS2008 project, open it in VS2008 BIDS, made NO changes to the report format and the exported Excel file is combining what should be the 2nd and 3rd groups into 1 group.  In the BIDS window, the grouping is working correctly.  Does anyone have any ideas what has changed between 2005 & 2008 that may cause this problem?  Thanks in advance.    

Crystal Report Export - Database Logon Failed Error -

 Below is my code in VB.Net.  I am using PUSH method to populate the DataSet.  I use Crystal Report and VS 2003.   I am trying to export a crystal report to a PDF and I am getting a database log on error.   Why would it give me this error since the report is getting its data from the DataSet.  Please help!!!  ---------------------------------------------- Try Dim oStream As New MemoryStream Me.crpt_numIssues.ExportToStream(ExportFormatType.PortableDocFormat) Response.Clear() Response.Buffer = True Response.ContentType = "application/pdf" Response.BinaryWrite(oStream.ToArray()) Response.End() Catch ex As Exception Dim mgsText As String mgsText = "ERROR: An error occured. <br>" + ex.ToString Me.ShowErrorPanel(mgsText) End Try ------------------------------ The error is: CrystalDecisions.CrystalReports.Engine.LogOnException: Database logon failed. ---> System.Runtime.InteropServices.COMException (0x8004100F): Database logon failed. at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext) at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqCo

Howe to do :Excel export button in report viewer visible false...?

hi all,  How I can do avoid to display  Excel export in ReportViewer..? if I Use //-------------------------- reportViewer1.ShowExportButton = false; //---------------------------------------------------- Both the buttons will be disabled...for only Excel button How can I...?    

Report fine; PDF export fine; Excel export crashes - ArgumentOutOfRangeException

I use the Report Viewer Redistributable 2005 Service Pack 1 (version 8.0.50727.1843). On my ASP.NET page the report displays fine, in a ReportViewer control, using an rdlc file. Export to PDF works fine. Export to Excel crashes. Stack does not tell me much because it's all internal to the Report Viewer:[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index]   System.Collections.ArrayList.get_Item(Int32 index) +7483656   Microsoft.ReportingServices.Rendering.ExcelRenderer.DoubleList.get_Item(Int32 index) +5   Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderImage(Image image, PageTableGrid pageTableGrid, PageReportItemInfo reportItemInfo, PageCell pageCell, Int32 row, Int32 col, Boolean addHeaderRows) +907   Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.RenderGridCell(PageLayout pageLayout, Int32 row, Int32 col, Hashtable& duplicateItemsTable, Boolean addHeaderRows, ReportItem parentItem, Hashtable riReferenceTable) +1317   Microsoft.ReportingServices.Rendering.BIFFUtility.WorkSheet.WriteRowBlocksAndCells(ExcelRenderer excelRenderer, Stream stream, UInt32 indexBeginOffsetPosition, Int32 minCol, Int32 maxCol) +936   Microsoft.ReportingServices.Rendering.BIFFUtility.BaseWorkSheet.WriteWorkSheet

How to export SSRS report to PDF from SSIS with parameters

Hello everyone.  I am trying to setup a process in which a user, who is using a vb.net 2008 application, will need to  trigger the creation of two items.  The first is  SSRS report which will need to be exported to PDF format to a shared folder on the network.  This report accepts one parameter.  The second thing that will need to be created at the same time is an excel file with data exported from SQL Server 2008 which is generated through an SSIS package.  A couple things to note.  The excel file and the pdf file need to have the same file name, other than the extension.  For example P00000001_20100831.pdf and P00000001_20100831.xlsx and will both be stored in the same network share.  The filenames need to be created dynamically at run time and will be based on a parameter being passed to the report. So far I have the portion that creates the excel file working fine.  The way I create that is as follows.  I have a stored procedure that creates a job which calls the SSIS package and passes the appropriate parameters to the SSIS package.  After the job is created I immediately run it and then delete the job.  Ok, everything works fine with that. Now I cant seem to figure out how to get the pdf created.  If possible I would like to keep this portion together with the already created job or package.&nb

RDLC - Export directly to Excel or PDF from codebehind


Is is possible to export directly to Excel or PDF from a code behind file without showing the reportviewer first and without the user having to click the export button. So that only the generating functionality is used?

I am using VB and LocalReport processing.

SSRS Report - Page break after the Header when export to PDF



I am using SSRS 2005 version. I am printing multiple invoices, taking multiple invoice numbers as a parameter and printing invoices.

I have grouped the report based on Invoice  number, so that the invoices are printed sequentially and there will be page break after each invoice. Within each invoice there is a header, body and footer.

My issue is after the header is printed, an automatic page break happens after the header, and the body moves to the next page. Therefore there is a large gap between the report header and the body. The report layout is landscape.

I wish any one can solve this issue and grateful if they can give the solution for my problem.




Disabling Export option for a single individual SSRS report

HI Forum Members,

    I read some discussions on disabling Export option in SSRS for an individual report.
Some said to go into the Report Properties in the Design tab and write below code:
Set ReportViewer.ShowExportControls = false;

I'm new for SSRS apart from doing some adhoc reports - So, i'm confused here. Where should i write this code?
Can any one help me.


can I use SQL Server to export an excel file directly?


I just want to know except use owc

can we use SQL Server to export excel file ?

if it can be , how to do? thanks alot

Export of rdl report from VSBI to Excel


Excel has a header.  How can I export info from the rdl header directly into the excel header.  Specifically, besides text, it would be desired to have the excel header reflect the pagination, i.e. page x of y. 

It is desired to have the page breaks existing in the rdl file to correspond to the page breaks as they are arranged in the rdl file when export occurs to Excel

Not able to export a large SSRS report into Excel



I have a requirement to export a large SSRS report into Excel. The report has more than 52 columns and around 70000 lines. The requirement is to export the report into a single excel(different sheets also would do ). Can you suggest some help in this regards?

Thanks in advance!

SSRS Report Page break when export to PDF



I am using SSRS 2005 version. I am printing multiple invoices, taking multiple invoice numbers as a parameter and printing invoices.

I have grouped the report based on Invoice  number, so that the invoices are printed sequentially and there will be page break after each invoice number. Within each invoice there is a header, body and footer.

My issue is for certain cases the line items in the body of the invoice, only the last line item moves to the next page. Cretaing a large gap in the body of the report. This happens only for some invoices. I am using Land scape type report, having Page size as 11 * 8.5 inches.

I wish any one can solve this issue and grateful if they can give the solution for my problem.

I can also send the RDL file, sample data as well as the PDF output for review.



Excel Export Report with Parent Child Dimension OLAP





I have a problem with a reporting services 2005 report.

The data source is OLEDB for OLAP 9.

The report contains all the members of a parent child dimension. An example of the implementation is defined in the post following the forum msdn:

The report works fine in web. The problem is when the report is exported as Excel, the groups disappeared and the entire dimension is ragged down.

Normally toggled groups in reporting services are exported to Excel with the appearance '+' or '-' on the

Export Reporting Services Report from PerformancePoint Bug?


I believe I've found a bug in the PerformancePoint web part--has anyone else run into this?  Here's the scenario:


1. An SSRS report against SSAS, from a Reporting Services Integrated mode (2008R2) instance, having two parameters (the # of parameters doesn't matter, and the same behavior below was observed when an older SSRS2005 Report Manger mode instance was used for reports as well)

2. A new Report object is created in PerformancePoint Dashboard Designer, and the report links are added

3. The Report is added to a PerformancePoint dashboard using Dashboard Designer

4. The Report is has paramters that match the report, and the filters are connected to the report

5. After the report is published, it behaves as expected--renders fine and the filters work fine

6. When the report is exported to Excel using the command on the PerformancePoint web part's drop-down menu, the report ALWAYS renders with the data that would be correct if *no* parameters were passed in by the PerformancePoint filters.  So, for example, the report always displays numbers for "ALL", even after the filter is changed to "North America".

#1 - #5 are all as expected.  #6 is unexpected, and appears to be a bug.  Step #6 in SharePoint 2007 with PerformancePoint worked fine--it only a

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend