Quantcast
Channel: SQL Server Reporting Services
Viewing all 1418 articles
Browse latest View live

Binding Dataset to RDLC

$
0
0

I am creating rdlc report(not using reportviewer, using report template). I have a business class which has a code for getting dataset by calling stored procedure. I am binding that dataset to rdlc report using ReportDataSource class. How to access this dataset in design?

In rdlc xml file, I tried to add dataset and it fields, it works fine if the columns are constant. I have a dataset it returns a datatable which has variable number of columns depending on user selection, that dataset I want to assign to table or any control in rdlc design. How can I do that?

Regards,

Megha


Problem with SSRS ReportViewer "View Report" button in ASP.NET MVC 4

$
0
0

I have used an SSRS ReportViewer in my mvc4 Application. At initial load it works fine... and then there is drop downlist in my reportviewer. I have changed the dropdown list to some other value and clicked on"View Report" Button on the report then it's crashed thowing some microsoft jscript runtime error.

ERROR DESCRIPTION:

Unhandled exception at line 5, column 84289 in http://localhost:56374/ScriptResource.axd?d=SCBjggIo9sABa1AodmE3Czs_gV1iSK5MeYv6hR6FSHJh4z93lhN7JRAieW9tbGVFIAITk0U_MEFNFSEGqluS5b4hwrGcU3bAgiO7thjZlA4jluhltPwBhD4FcKl3N1PAYxcypbSfvg-BdgDoI31MmjxggOwHp7M49E7ddpsKeGs1&t=6119e399

0x800a139e - Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.

Details: Error parsing near '

<!DOCTYPE html PUB'.

I have set up everthing in web.config.


Please go through the code below that I have used.

protected void Page_Load(object sender, EventArgs e)
{



if (!this.IsPostBack)
{
this.DataBind();
SsrsReportViewer.ProcessingMode = ProcessingMode.Remote;
SsrsReportViewer.Width = Unit.Percentage(100);
SsrsReportViewer.Height = Unit.Pixel(400);
ServerReport serverReport = SsrsReportViewer.ServerReport;
List<ReportParameter> ReportParems = new List<ReportParameter>();
ReportParems.Add(new ReportParameter("Id", Convert.ToString(Id), false));
serverReport.ReportServerUrl = new Uri(WebConfig.SSRSReprotServerUrl);
serverReport.ReportPath = SsrsRdlcLoacation;
if (!string.IsNullOrEmpty(FirmFilterColumn))
serverReport.SetParameters(ReportParems);
}
}

Code in Page

<div>
<asp:ScriptManager id="ScriptManager1" ScriptMode="Release" runat="server"></asp:ScriptManager>
<asp:HiddenField ID="time" runat="server"/>
<rsweb:ReportViewer ID="SsrsReportViewer" runat="server" AsyncRendering ="false"></rsweb:ReportViewer>
</div>

Web.Config

<httpHandlers>
<add verb="*" path="*.mvc" validate="false" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add verb="*" path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" validate="true" />
</httpHandlers>

Dynamic Bind DataSet to ReportViewer

$
0
0

Hi everyone,

Currently I'm trying to bind dataset to reportviewer by code. But getting following error:-

  • A data source instance has not been supplied for the data source 'DataSet1'.

I'm using VB. It is highly appreciated if anyone can provide some guidance to me. Following is my code:-

ProtectedSub Page_Load(ByVal sender AsObject,ByVal e As System.EventArgs)HandlesMe.Load

Dim selectSQL AsString

selectSQL = "SELECT DISTINCT(branch) from Sales WHERE branch = '01' and SalesDate = '2013-01-01'"

Dim conn AsNewSqlConnection(ConnectionString)

Dim cmd AsNewSqlCommand(selectSQL, conn)

Dim adapter AsNewSqlDataAdapter(cmd)

Dim ds AsNewDataSet()

Try

conn.Open()

adapter.Fill(ds, "DataTable1")

Me.ReportViewer1.Reset()

Me.ReportViewer1.LocalReport.ReportPath = Server.MapPath("Report1.rdlc")

ReportViewer1.LocalReport.DataSources.Add(NewReportDataSource("DataSet1_DataTable1", ds.Tables("DataTable1")))

Me.ReportViewer1.DataBind()

Me.ReportViewer1.LocalReport.Refresh()

Catch ex AsException

Label1.Text = Err.ToString

Finally

conn.Close()
End

Try

End

Sub

Thank you in advance!!

 

 

[A]Microsoft.Reporting.WebForms.ReportHierarchy cannot be cast to [B]Microsoft.Reporting.WebForms.ReportHierarchy.

$
0
0

Ok, I have a strange problem here. I'm using V10 of the reportviewer. The report runs perfectly fine but when I attempt to use anything like Export, I get this error:

 

Server Error in '/YOURSITE' Application.
--------------------------------------------------------------------------------

[A]Microsoft.Reporting.WebForms.ReportHierarchy cannot be cast to [B]Microsoft.Reporting.WebForms.ReportHierarchy. Type A originates from
'Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' in the context 'Default' at location
'C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\10.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll'.
Type B originates from 'Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' in the context
'Default' at location 'C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\11.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer
.WebForms.dll'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.InvalidCastException: [A]Microsoft.Reporting.WebForms.ReportHierarchy cannot be cast to [B]Microsoft.Reporting
.WebForms.ReportHierarchy. Type A originates from 'Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' in the context 'Default' at location 'C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\
10.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll'. Type B originates from 'Microsoft.ReportViewer.WebForms, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=89845dcd8080cc91' in the context 'Default' at location 'C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.
WebForms\11.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.WebForms.dll'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidCastException: [A]Microsoft.Reporting.WebForms.ReportHierarchy cannot be cast to [B]Microsoft.Reporting.WebForms.ReportHierarchy.
Type A originates from 'Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' in the context
'Default' at location 'C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\10.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer
.WebForms.dll'. Type B originates from 'Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'
in the context 'Default' at location 'C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\11.0.0.0__89845dcd8080cc91\Microsoft
.ReportViewer.WebForms.dll'.]
   Microsoft.Reporting.WebForms.ViewerDataOperation..ctor() +289
   Microsoft.Reporting.WebForms.ReportDataOperation..ctor(Boolean requiresFullReportLoad) +118
   Microsoft.Reporting.WebForms.ReportDataOperation..ctor() +34
   Microsoft.Reporting.WebForms.ExportOperation..ctor() +29
   Microsoft.Reporting.WebForms.HttpHandler.GetHandler(String operationType) +206
   Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +180
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +341
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929


Also, when I click Print, I get "Unable to load client print control."

Print option

$
0
0

I have embedded a SSRS 2005 report with my asp.net page, using the ReportViewer option.

Users have noticed that the print option has disappeared, how do I allow users to print the report directly from the page.

 

SQL Reporting Services 2008 and Report Viewer Control

$
0
0

Hello Everyone,

i have a printing issue with the report viewer control on an machine that runs Windows XP 32 bit. When the users clicks on the print icon (the one that is on the right of the "Select a format" dropdownlist), the dialog box with the printer selection appears and when i choose the printer an internet explorer alert appears that displays the followin message:

"Printing Error" - An error has occured during printing 0x80040154

Does anyone know how to fix this issue? I tried Microsoft FixIt, i Reinstalled the active x control (Delete the files from Downloaded program files and the when the site asked me to install the sqlreportingservices active x, i simply reinstalled it), but it still does not work properly.

Any Suggestions?

Vassilis

Sql Reporting Error [COMException (0x80040154)]

$
0
0

Hi All, 

I am having this problem with displaying a ReportViewer webform. This has happened just recently and I have been trying to do everything to fix the problem. Uninstall  .Net Frameword 3, reinstall  .Net Framework 2 and still nothing. Restart IIS and the whole bit. It's not something with just the web app cause on my other Web Apps if you try to view the report it automatically give the error below. I have manually visit the report and it displays just fine. Any ideas???

Unhandled Execution Error

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException:

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.

Stack Trace:

[COMException (0x80040154)]
System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) +0
System.Management.ManagementObjectEnumerator.MoveNext() +455
Microsoft.ReportingServices.Diagnostics.WebUtil.GetIPAddresses(String machine) +295
Microsoft.ReportingServices.Diagnostics.WebRequestUtil.get_LocalIPAddresses() +138
Microsoft.ReportingServices.Diagnostics.WebRequestUtil.IsLocalIPAddress(String ipAddress) +37
Microsoft.ReportingServices.Diagnostics.WebRequestUtil.IsClientLocal() +79
Microsoft.Reporting.WebForms.ErrorControl.WriteStackTrace(HtmlTextWriter writer) +10
Microsoft.Reporting.WebForms.ErrorControl.Render(HtmlTextWriter writer) +43
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
Microsoft.Reporting.WebForms.ReportViewer.Render(HtmlTextWriter writer) +248
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +59
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +68
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +37
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
System.Web.UI.Page.Render(HtmlTextWriter writer) +26
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1896


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

External Image having url starts with https is shown in ssrs report in edit mode but not renders in reportviewer after deploying.

$
0
0

External Image having url starts with https is shown in ssrs report in edit mode but not renders in reportviewer after deploying.

The src of image is empty in the browser.

help me regarding this


Toggling on top level group and breaking page on sub group.

$
0
0

I have an issue that I've spent hours trying to resolve without success. I am using the ReportViewer control in asp.net, LocalReport, no Reporting Services (but I'm not sure that matters).  I think I should be able to do this but it may be a limitation of the control.  Looking for any suggestions on this one...

 

On the .rdlc definition, I have 3 row groups:

mkt_name

->page_rows

 ---> details

The top level group, 'mkt_name', groups on a datatable's column called 'mkt_name'.  **This is the field that I would like to have toggle on the report with +/- nodes.

The 2nd group, 'page_rows', has a group of : =Int((RowNumber("mkt_name")-1)/15)

Basically, I want to page every 15 rows. This is a must to prevent the screen from trying to paint 300 rows at a time. I have a page break set at the end of this group.

I am successfully paging at 15 rows but only because I have 'Visibility' of 'Show' for all groups. This isn't really what I want.  Under 'Visibility', and the 'Display can be toggled by this report' section, I want to set the mkt_name group column for the toplevel group for either the 'page_rows' or 'details' group.  So, the top-level mkt_name group will have a + sign, then when I click on that mkt_name, it expands the details *but only the 1st 15 rows*. Then, when the user clicks next page, the next 15 rows show up, etc.

 

What I have found is that when I toggle on mkt_name - on any of the sub groups, all rows come back. So, if there are 90 rows under 'mkt_name' of 'ABC', all 90 rows display, not the 1st 15. Only when I remove the toggling and set visibility to 'Show' for all groups does the paging at 15 work. Of course then I can't toggle the top level groups.

 

Hopefully this makes sense to someone. If so, any suggestions? Is this a limitation of the control. Any tips are appreciated!  Thanks.

 

 

Column Headers using dataset field name

$
0
0

Is it possible to use the Dataset field name as a column header.

If you know of some example URL's perhaps that give examples if its possible.

 

Reportviewer preview and printing show different font type

$
0
0

Hi everyone,

I'm using vb.net to generate my report (reportviewer)

When I browse in IE, everything display correctly. But when I print my report, the font printed out different from the one display on computer screen. Totally different font type and no spacing in between font.

I tried to change the font type in RDLC, but still cannot resolve this issues.

It is highly appreciated if someone can give me some advise how to resolve this problem.

Thank you.

How to add Image into TextBox in RDLC reports

$
0
0

 I want to add a images in textbox control in RDLC files using the <a> tag or <img> tag.

I know texbox control supports limited HTML tags in RDLC.but

Is there any way to add the images in RDLC reports with out using the the Image control.

OR

can we add the image control in text box control.

 

Passing Single value and Multi value parametes to SSRS report server from asp.net

$
0
0

Hi,

  I have been struggling with this for the past 4 days. I tried all possible solutions from different forums. I do have two parameters in the reports. The first one can accept a single value and second parameter accepts multiple values. I have set the 2nd parameter as multi value parameter and its expression as Join(Parameters!Route.Value,","). For some reason I get the error message “Parameter “Route” is missing its value”.  Here is my code

 

If Not ((ddlLocation.SelectedValue = "") Or (chkMultipleRoutes.SelectedValue = "")) Then
            'Dim SelectedRoutes As New List(Of String)
            Dim myAL = New ArrayList
            Dim Routes As New List(Of String)
            myAL.Add(ddlLocation.SelectedValue)
            For i As Integer = 0 To chkMultipleRoutes.Items.Count - 1
                If chkMultipleRoutes.Items(i).Selected Then

                    'txtSelectedRoutes.Text += chkMultipleRoutes.Items(i).Text + "','"
                    myAL.Add(chkMultipleRoutes.Items(i).Text)

                    txtSelectedRoutes.Text += chkMultipleRoutes.Items(i).Text + ","
                    txtSelectedRoutes_PopupControlExtender.Cancel()

                End If
            Next



            Dim reportParameterCollection As ReportParameter() = New ReportParameter(1) {}
            reportParameterCollection(0) = New ReportParameter()
            reportParameterCollection(0).Name = "LocationID"
            reportParameterCollection(0).Values.Add(ddlLocation.SelectedValue)

            reportParameterCollection(1) = New ReportParameter("Route", CType(myAL.ToArray(GetType(String)), String()))



            ReportViewer1.Visible = "True"
            ReportViewer1.ProcessingMode = ProcessingMode.Remote
            ReportViewer1.ServerReport.ReportServerUrl = New Uri("http://test/ReportServer_RPT")
            ReportViewer1.ServerReport.ReportPath = "/ReportTest"

            ReportViewer1.ServerReport.SetParameters(reportParameterCollection)
            ReportViewer1.ServerReport.Refresh()


I really appreciate any help this. What is that I am doing wrong here?

 

 

Thanks

ylsv

 

 

expression in Report view in asp.net

$
0
0

Hi 

I have problem in Report viewer.  I am using the expression to filter the value. I explain my scenario.

I want sum the amount for particular category. I have student database. I need the sum the paid amount for exam fee only.

=SUM(Fields!Amount.Value, "DataSet1") . It sums all amount. But I need to sum EXAM FEE only. Please help me how to do this

Thank  you

Maideen

Multiple Dataset in RDLC

$
0
0

Hi All

Is it posible to use two or more dataset in a RDLC report?

Can anyone guide me about this?


Extracting column value from SSRS Report and using it to populate

$
0
0

Hi,

I have two pages each containing a single report.  The first report let's you retrieve information using a dropdownlist.  Clicking on the item number (ItemID) will take you to a second page.  The second page contains a report which is populated based on the ItemID passed from the first report.  Along with the report on the second page is some C# code which is designed to allow edits to data NOT contained in the report.  What I'm trying to do is pass the ItemID from the first page report OR from the second page report to the C# code to execute a stored procedure populating the editable data.  I've spent the better part of two days trying to find a solution though all I have found are methods to pass values from an ASP.NET page to SSRS but I need to do the opposite:  Pass SSRS column values to an ASP.NET(C#) page.

Any help would be greatly appreciated.

column sort in Report Viewer

$
0
0

Hi,

I have done a report using report viewer.

am binding columns(Month names) dynamically based on stored procedure values..

The month names when selected in stored procedures, are coming in correct order like..

January

Febraury

March....

But When binding to report viewer, the columns are unordered like

April, january, june, march,may....

Please give me a solustion to put them in correct order like jan,feb,mar,apr..etc.

thanks,

Prabhanjan

ReportViewer - strange not shown exception when creating the report

$
0
0

Hi,

I'm using the WebForms version of the ReportViewer in LocalMode. In the structure I have one main report with 5 subreports. Generation of the report is really slow (1800 report pages for around 10 minutes). While debugging, when I stop and I see the executing thread, the location is most of the time in

Microsoft.ReportingServices.DataExtensions.MappingDataReader.GenerateFieldErrorException()

I can't find anywhere in the web what exactly this method do, and most especially, what is the cause for this FieldErrorException. By the way, no exception is thrown during the whole process of creating the report and that's the only info I have.

Usage Report on an ASP.Net website

$
0
0

I just finished developing a VS 2010/ASP.NET 4.0 'PhoneBook' website on the Windows Server 2008R2. 
The PhoneBook website runs very well.  Yesterday, I was asked to develop a 'usage report' on this PhoneBook
website.

Because the PhoneBook link is listed in our SharePoint website, we may be able to set up a report fron the S.P. site.
However, our users may also open the PhoneBook from the START menu or desktop shortcut icons.  Therefore,
we probably need to develiop an 'IIS Usage Report' application. 

What is the most easy way to create this application?   From IIS Manager?   PhoneBook ASP.NET website? 
Third-party application for integrating the ASP.NET website and SQL Server database?

TIA,
Jeffrey


 

How to convert rdlc report into pdf using iTextSharp?

$
0
0

Hi,
I've a rdlc report which I need to convert into pdf dynamically.
How to do this using iTextSharp?

I tried with normal code like below. but, it throws exception "No printers are installed".
byte[] bytes = ReportViewer1.LocalReport.Render("PDF");
Response.ClearContent();
Response.ClearHeaders();
Response.ContentType = "application/pdf";
Response.BinaryWrite(bytes);
Response.Flush();
Response.Close();

Viewing all 1418 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>