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

Report definition for 'rptReport' hasnot been specified.

$
0
0

I am trying to build a report viewer in an ASP.net page.  I am using Reportviewer 11.0.0.0 in a VS 2010 project in VS 2012.

I did the following:

  1. I copied an RDL file from and SSRS report into the project with the extension changed to rdlc. 
  2. I created a datatable in a dataset file using the SQL used in the original SSRS report.
  3. I opened the report in the report designer and changed the datasource and the dataset to those created in the project in step 2
  4. After several hours, I was finally able to get the report viewer's smarttag to open and  I was able to set the report in the smarttag.  The report has the reference to the dataset saved in it.  So I guess that is why the "Choose Datasource" box showed up empty.  As did the datasource instances. 

However, the first run of the report gave me an error reporting:

A data source instance has not been supplied for the data source

So I tried to do it in the page_load by doing the below.

this.rvCodCost.ProcessingMode = ProcessingMode.Local;
            this.rvCodCost.LocalReport.ReportPath = "Reports/DodIC_Expiration_Report.rdlc";
            ReportDataSource rds = new ReportDataSource("ReportDataSet", ReportDataSet.DataTable1DataTable);
            this.rvCodCost.LocalReport.DataSources.Add(rds);

However this resulted in the error:

The call is ambiguous between the following methods or properties: 'Microsoft.Reporting.WebForms.ReportDataSource.ReportDataSource(string, System.Collections.IEnumerable)' and 'Microsoft.Reporting.WebForms.ReportDataSource.ReportDataSource(string, System.Data.DataTable)'

So I commented out this code and I tried clicking "rebind datasource" several times then running the app.  I now got the error,

"The report definition for report 'RptXXX' has not been specified."

It seems like this should be so simple yet I've been working on this one 8 line web page all day and have still not been able to show a report in the report viewer.

I have view a lot of information on the web but most everyone says to fix this issue, put it in the code which throws the error above.

I have not seen anyone address the issue of the empty datasource box in the choose datasource or explain why you set the datasource in the report if it is not used.

 


TEXT BOX SET DIFFERENT ... in Reporting services ...

$
0
0

good morning

in reporting services 2010 I have several text boxes one below the other ....

but these take different value when I export to word,

want to show me the plates a hit to the other, for more than the next in the designer, when I export it is not well written the letter I'm doing in aspnet


ie I exported something like this:

Installer OE: 12014    , installed by: juan aguilar      it was remote

12014 and  juan aguilar  as textbox...

Report Viewer

$
0
0

Hi,

I have a table in my report.  I am trying to show/hide a merged textbox (the entire row) in the table based on whether or not any data from my query is populated in the table.

For instance:
If my table contains data, I want the "No data available" textbox to stay hidden.
However, if my table does not contain any data, I want my "No data available" textbox to be visible.

Here is what I have so far in the "Visibility" tab of the "No data available" textbox in my table:  =Iif(Fields!Status.Value = "", e.style.visibility = "visible", e.style.visibility = "hide")

Does anyone know how to do this?

Thanks.

Web Report Causing An Infinite Loop

$
0
0

I am having problems moving my reports from VS2008 to VS2010.  I have made several WEB reports in VS2008 that use the code below on the load event of the WEB page to provide a data for the report and they all work correctly.  I have to use this method of providing data because I am using several complicated queries that brake the VS2008 and VS2010 wizard.

When I try to convert over to VS2010, the report loading message flashes on the screen and the report never loads.  I have run this code in debug and found that it is causing an infinite loop.  After the code runs, the load event fires again.  I tried adding an exit sub at the end of the code for a test but it has no effect.

Below is a sample of the code that I am using with a simplified query and names.  Any help would be appreciated.



   Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        ' Declare connection string.
        Dim cnString As String = ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString.ToString


        ' Declare Connection, command and other related objects
        Dim conReport As New SqlConnection(cnString)
        Dim cmdReport As New SqlCommand()
        Dim drReport As SqlDataReader
        Dim dsReport As DataSet = New DataSet1()

        'Dim dsReport As DataSet = New dsProductReorder

        Try
            ' Open connection
            conReport.Open()

            ' Prepare connection object to get the data through reader and populate into dataset
            cmdReport.CommandType = CommandType.Text
            cmdReport.Connection = conReport
            cmdReport.CommandText = "SELECT * FROM MyTable"


            ' Read data from command object
            drReport = cmdReport.ExecuteReader()

            ' Load data directly from reader to dataset
            dsReport.Tables(0).Load(drReport)

            ' Close reader and connection
            drReport.Close()
            conReport.Close()
       
            ' Provide local report information to viewer
            ReportViewer1.LocalReport.ReportPath = "Report.rdlc"
       
            ' Prepare report data source
            Dim rds As New ReportDataSource()

            ' rds.Name = "dsProductReorder_dtProductReorder"
            rds.Name = "DataSet1_DataTable1"


            rds.Value = dsReport.Tables(0)
            ReportViewer1.LocalReport.DataSources.Add(rds)

            ' Load report viewer
            ReportViewer1.LocalReport.Refresh()

        Catch ex As Exception
            ' Display error message in the output window.
            Debug.Print("The following error occured " & ex.Message)


        Finally
            ' Check if connection is still open then attempt to close it.
            If conReport.State = ConnectionState.Open Then
                conReport.Close()
            End If
        End Try
    End Sub

Two datasets inside a same tablix

$
0
0
<div class="row" style="width: 800px; overflow: visible;">Using SSRS , need to generate report, here i have two datasets one for main display & second dataset for displaying 2 sub categories of first datasets.

So the output will be, first dataset's each row may or may not contain its respective 2 sub categories[second dataset].

so here i need to display main row with its repective 2 sub catgories if present for that main row.

Any idea of how to display as Main dataset as Parent row with its repective 2 sub categories row next to it if present

two datasets used also is their possible to display with two tablix , one tablix present inside other or so

sample output :

1 , parent row1
Child 1
child 2
parent row2 ----- in case of no child , child 6, child 7 will not be displayed , only Parent row2 alone displayed
Child 6
child 7
parent row3
Child 3
child 4
</div> <div class="row" style="width: 800px; text-align: right;">Edit  Abuse</div><div class="newlinesmall"></div> <div style="margin: 0px; padding: 0px 0px 0px 0px; background: url('/images/NullSkullFooterBackground.png') repeat left top; bottom: 0px; height: 80px; float: left; position: fixed; width: 100%;"> <div style="margin: 0 auto; vertical-align: middle; padding: 0px 0px 0px 7px; width: 1250px; height: 80px; background: url('/images/NullSkullFooter.png') no-repeat left top;"></div> </div>

Scope error and nested aggregate function error

$
0
0

Hi,

I'm working in RD 1.0, and am using two datasets in one report. 

I initially ran into a scope error on the following expression:

=SUM(IIF(Fields!POSTED.Value="Yes",Val(Fields!RewardDollars.Value), Val(0)))

...but after modifying the expression (see below) to define which DS I want the data from I got another (nested aggregate function) error.  The original error is still there too.

=SUM(IIF(First(Fields!POSTED.Value, "DataSet1")="Yes",First(Fields!RewardDollars.Value,"DataSet1"),Val(0)))

...And here is the error message:

"The Value expression for the textbox '' textbox87' contains an aggregate function (or RunningValue or RowNumber functions) in the arguement to another aggregate function (or RunningValue).  Aggregate functions cannot be nested inside other aggregate functions."

I'm not sure why this error would rear its head only after I define the scope, but there you have it.

Could someone help out?

Thanks

Jens

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

$
0
0

Hi

I really need help with this problem that I have been working on for some time

I have an Sql database and a report in asp.net webpage that is showing the contents of the database

I added a textbox to filter the retrieved contents of the database using a simple SELECT command and then passing the data to a dataset to populate the report with the filtered data. 

I also added a GridView that I am filling with the same dataset just to see what is happening behind the scenes.

So when I load the page, it is runing as expected, the report loads all the contents in the database

When writing the name of a country in the textbox (ex UK) and hitting the button, the Gridview shows the correct selection results (only UK) so the dataset is being filled correctly, but the report generates an error:

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

I cant understand why this is happening, I have selected the datasource in the reportviewer already

Any help is appreciated 

Here is the code of the page Default3.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %><%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"><title></title></head><body><form id="form1" runat="server"><div><asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager><asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" /><asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br /></div>&nbsp;&nbsp;&nbsp;<asp:GridView ID="GridView1" runat="server"></asp:GridView>&nbsp;<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana"
        Font-Size="8pt" InteractiveDeviceInfos="(Collection)"
        WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt" Width="978px"><LocalReport ReportPath="Report.rdlc"><DataSources><rsweb:ReportDataSource DataSourceId="ObjectDataSource1" Name="DataSet1" /></DataSources></LocalReport></rsweb:ReportViewer><asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
        SelectMethod="GetData" TypeName="DataSet1TableAdapters.NorthwindTableAdapter"></asp:ObjectDataSource></form></body></html>

And the Daeault.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.Reporting.WebForms;
using System.Data;
using System.Configuration;
using System.Data.SqlClient;

public partial class Default3 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string CS = ConfigurationManager.ConnectionStrings["DBCS2"].ConnectionString;
        using (SqlConnection con = new SqlConnection(CS))
        {

            SqlDataAdapter da = new SqlDataAdapter("SELECT * FROM Northwind WHERE([Country]='" + TextBox1.Text + "')", con);
            DataSet ds = new DataSet();
            da.Fill(ds);
            GridView1.DataSource = ds;
            GridView1.DataBind();

            ReportDataSource datasource = new ReportDataSource("DataSet1_Northwind", ds.Tables[0]);
            ReportViewer1.LocalReport.DataSources.Clear();
            ReportViewer1.LocalReport.DataSources.Add(datasource);        
            ReportViewer1.LocalReport.Refresh();

        }    
    }
}

Kind regards




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.

 


Error on IFF

$
0
0

I am new to rdl reports and I am trying to change a report for the first time.

I am trying to do the following command:

 

=IFF(cint(Fields!Headers.Value)=1,"ApplyDate",Fields!APPLYDATE.Value)

 

However the IFF is underline (error)

What do I have to do to let my report use the IFF statment.

GROUPING IN RDLC

$
0
0

Hi all,

How to make grouping in rdlc, i have pasted my requirement below, where i need to showThyroid Function Test, Routine Investigations, Electrolytes, Diabetic Profile ,Lipid Profilesas my group names for different tests. 

TESTNAMERESULTSTATUSNORMAL VALUES
Thyroid Function Test   
T35H1.30 TO 3.10 n moI/L
T45L66.00 TO174.0 n moI/L
TSH5H0.270 TO 4.20 u IU/ml
Routine Investigations   
Random Blood Glucose5H<150 mgs/Di
Blood Urea5L20-45 mg/Di
Blood Creatinine5H0.7-1.2 mgs/Di
Serum Uric Acid5L2-7 mgs/Di
Electrolytes   
Calcium5H8.2-10.4 mgs/Di
Diabetic Profile   
Fasting Blood Sugar5H60-100 mgs/Di
Post Prandial Blood Sugar5L<150 mgs/Di
HbAlc%5H4.0-6.0 %
Lipid Profiles   
Total Cholesterol5H<200 mgs/Di
H.D.L Cholesterol5L>40 mgs/Di
L.D.L Cholesterol-1H<100 mgs/Di
S. Triglycerides5L<150 mgs/Di
V.L.D.L Cholestrol1H<30 mgs/Di

Advice on how to create large report

$
0
0

Hi all,

I'm relatively new to SSRS, having created a few small reports which reference a simple stored procedure to get data. But I have a whopper assigned to me.  It's not necessarily difficult, just huge.  The finished report is to be a collection of approx. 20 tables, each with 7 columns and 6 rows.  Each cell is a COUNT from a sql query (i.e. SELECT COUNT(*) FROM table).

Surely there must be a more efficient way than creating a separate dataset for each cell in 20 tables.  That's hundreds of datasets.

I thought of creating a temp table in my stored procedure housing all of the data, but I'm not sure how to extract it on the SSRS end, and populate each individual cell.

I would greatly appreciate any advice or suggestions you might have.

Thank you.

column miss when export word

$
0
0

Hi !!!
I have a problem. My report has 13 columns. So that when i export to word , it misses 2 columns.
My property is : 11in , 8.5in (landscape). 
I dont want to up report's width.
How can i resolve.

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.

 

 

Multiple columns in reporting services

$
0
0

hello

I have a page in aspnet 4.0 aspx where CheckBoxList with 3 columas use, and horizontal orientation, the charge of the database very well ....

but I want to do that in reporting services and export it to Word 2003, and that exporting remains very well ........

rdlc report datasource not found in mvc4

$
0
0

http://www.codeproject.com/Articles/473844/Using-Custom-Data-Source-to-create-RDLC-Reports

i follow this sample to develop my report in mvc4 environment, while config in report wizard,  datasource don shows any item for me to select.

so i create (asp.net web forms application) project to test the rdlc report wizard again, i success to getcpReportCustomData.Data in datasource.

i already checked the steps are correct, just don know why cpReportCustomData.Data disappear in datasource (mvc4)


Display report using page number

$
0
0

I'm planning to convert a Business Object report to SSRS. I need help in the following feature.

The current report prompt the page number to the user and it pulls the record form that page.

Is this feature is available in SSRS. Any help appreciated.

Displaying Parameter in RDLC

$
0
0

Hi all,

I have a stored procedure in which @YEAR and @MONTH are my 2 input parameters using this SP i need to generate a report and show it output in rdlc. 

Report is working fine expect displaying month.

For Eg: If i pass 2013 and 8 as my input parameters its works fine but in rdlc i want this month number 8 as to be displayed as AUGUST

Below is my code related to month,in design (aspx) page and report viewer page 

aspx:

private void bindDDlmonths()
{
string year = ddlYear.SelectedValue.ToString();
ds = objlrc.Getmonths(year);
ddlMonth.DataSource = ds.Tables[0];
ddlMonth.DataTextField = "MONTHS";
ddlMonth.DataValueField = "MONTHS_NO";
ddlMonth.DataBind();
}


Report Viewer:

ReportParameter Year = new ReportParameter("Year", this.year);
ReportParameter Month = new ReportParameter("Month", this.month);
this.ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { Year });
this.ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { Month });

Thank You,

SSRS Install/Config Issue

$
0
0

I installed SSRS 2008 on a Windows 2003 Server using the default install configuration.  I created a test report and set to security to allow everyone access to view it.  When testing from the server, logged on with my admin account I can access the reports using http://servername/reports.  But when I go to a user's machine, using that user's login, I cannot get to the reports using that configuration.  But if I go to SSRS configuration manage and change it to use the IP address then the user can get to the reports.  This is not the optimal solution, so how to fix?

Second issue is the print button causes IE 10 to crash.  I have tried all of the IE settings suggested for this problem, including adding the SSRS IP path to the trusted sites.  How to solve this?  I am thinking these 2 issues are related.  Thanks

Detail rows in Reports (rdlc)

$
0
0

Hi,

I have two lists of two diff types.

One is header and another is detail.

I want to show in Report as;

1. Bind header list.

2. Bind detail list as sub rows to each header row...

How to do this....

Freeze Tablix Column Headers while Scolling

$
0
0

Hi

I am generating rdlc report. My doubt is i want to freeze the Table header (like excel freeze)in the rdlc report while scolling. I has tried the method below but its not working:

FixedColumnHeaders = True;
Keep Header Visible While Scrolling = True


Viewing all 1418 articles
Browse latest View live


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