473,386 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Reportviewer not showing any data

Hello,
I have an issue. I'm not seeing the reportviewer data at all. The
column names come up fine but there is no data in the report table.
Here is what I'm doing

I created a dataset with the following query
select * from av_project_mst where apm_project_id=@projectid

Now I created a report (.rdlc) and dragged a table onto it and the
report looks like the following

<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/
2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/
SQLServer/reporting/reportdesigner">
<DataSources>
<DataSource Name="test1">
<rd:DataSourceID>0ac0f7f1-9a46-4289-a79d-97cab9205b09</
rd:DataSourceID>
<ConnectionProperties>
<DataProvider>SQL</DataProvider>
<ConnectString />
</ConnectionProperties>
</DataSource>
</DataSources>
<InteractiveHeight>11in</InteractiveHeight>
<ReportParameters>
<ReportParameter Name="projectid">
<DataType>String</DataType>
<DefaultValue>
<Values>
<Value />
</Values>
</DefaultValue>
<AllowBlank>true</AllowBlank>
<Prompt>Report_Parameter_0</Prompt>
</ReportParameter>
</ReportParameters>
<rd:DrawGrid>true</rd:DrawGrid>
<InteractiveWidth>8.5in</InteractiveWidth>
<rd:SnapToGrid>true</rd:SnapToGrid>
<RightMargin>1in</RightMargin>
<LeftMargin>1in</LeftMargin>
<BottomMargin>1in</BottomMargin>
<rd:ReportID>4b5ab029-97b6-4439-966e-4a51232b81d2</rd:ReportID>
<DataSets>
<DataSet Name="DataSet1_AV_PROJECT_MST1">
<Fields>
<Field Name="APM_Project_Name">
<DataField>APM_Project_Name</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="APM_Project_Start_Date">
<DataField>APM_Project_Start_Date</DataField>
<rd:TypeName>System.DateTime</rd:TypeName>
</Field>
<Field Name="APM_Project_End_Date">
<DataField>APM_Project_End_Date</DataField>
<rd:TypeName>System.DateTime</rd:TypeName>
</Field>
<Field Name="APM_Project_InCharge">
<DataField>APM_Project_InCharge</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="APM_Project_Desc">
<DataField>APM_Project_Desc</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="APM_Project_ID">
<DataField>APM_Project_ID</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="APM_RECADDID">
<DataField>APM_RECADDID</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="APM_RECADDDATE">
<DataField>APM_RECADDDATE</DataField>
<rd:TypeName>System.DateTime</rd:TypeName>
</Field>
<Field Name="APM_RECUPDATEID">
<DataField>APM_RECUPDATEID</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="APM_RECUPDATEDATE">
<DataField>APM_RECUPDATEDATE</DataField>
<rd:TypeName>System.DateTime</rd:TypeName>
</Field>
</Fields>
<Query>
<DataSourceName>test1</DataSourceName>
<CommandText>select * from av_project_mst where
apm_project_id=@projectid</CommandText>
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
</Query>
<rd:DataSetInfo>
<rd:DataSetName>DataSet1</rd:DataSetName>
<rd:TableName>AV_PROJECT_MST</rd:TableName>
<rd:TableAdapterName>AV_PROJECT_MSTTableAdapter</
rd:TableAdapterName>
<rd:TableAdapterFillMethod>Fill</rd:TableAdapterFillMethod>
<rd:TableAdapterGetDataMethod>GetData</
rd:TableAdapterGetDataMethod>
</rd:DataSetInfo>
</DataSet>
</DataSets>
<Width>10.83333in</Width>
<Body>
<ReportItems>
<Table Name="table1">
<DataSetName>DataSet1_AV_PROJECT_MST1</DataSetName>
<Top>0.75in</Top>
<Details>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="APM_Project_Name">
<rd:DefaultName>APM_Project_Name</
rd:DefaultName>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<ZIndex>2</ZIndex>
<CanGrow>true</CanGrow>
<Value>=First(Fields!APM_Project_Name.Value)</
Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="APM_Project_Start_Date">
<rd:DefaultName>APM_Project_Start_Date</
rd:DefaultName>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<ZIndex>1</ZIndex>
<CanGrow>true</CanGrow>
<Value>=First(Fields!
APM_Project_Start_Date.Value)</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox6">
<rd:DefaultName>textbox6</rd:DefaultName>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.25in</Height>
</TableRow>
</TableRows>
</Details>
<Header>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox1">
<rd:DefaultName>textbox1</rd:DefaultName>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<ZIndex>8</ZIndex>
<CanGrow>true</CanGrow>
<Value>APM Project Name</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox2">
<rd:DefaultName>textbox2</rd:DefaultName>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<ZIndex>7</ZIndex>
<CanGrow>true</CanGrow>
<Value>APM Project Start Date</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox3">
<rd:DefaultName>textbox3</rd:DefaultName>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<ZIndex>6</ZIndex>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.25in</Height>
</TableRow>
</TableRows>
</Header>
<TableColumns>
<TableColumn>
<Width>3.61111in</Width>
</TableColumn>
<TableColumn>
<Width>3.61111in</Width>
</TableColumn>
<TableColumn>
<Width>3.61111in</Width>
</TableColumn>
</TableColumns>
<Height>0.75in</Height>
<Footer>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox7">
<rd:DefaultName>textbox7</rd:DefaultName>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<ZIndex>5</ZIndex>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox8">
<rd:DefaultName>textbox8</rd:DefaultName>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<ZIndex>4</ZIndex>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox9">
<rd:DefaultName>textbox9</rd:DefaultName>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<ZIndex>3</ZIndex>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.25in</Height>
</TableRow>
</TableRows>
</Footer>
</Table>
</ReportItems>
<Height>2in</Height>
</Body>
<Language>en-US</Language>
<TopMargin>1in</TopMargin>
</Report>

After this I created a aspx file and dragged the reportviewer control
onto it which looks like following

<rsweb:ReportViewer ID="ReportViewer1"
runat="server" Font-Names="Verdana" Font-Size="8pt"
Height="400px" Width="560px">
<LocalReport ReportPath="c:\inetpub
\wwwroot\sarvarpitgroup\av_system\Report\PurchaseR eport.rdlc">
<DataSources>
<rsweb:ReportDataSource
DataSourceId="ObjectDataSource1" Name="DataSet1_AV_PROJECT_MST1" />
</DataSources>
</LocalReport>
</rsweb:ReportViewer>
<asp:ObjectDataSource
ID="ObjectDataSource1" runat="server" SelectMethod="GetData"

TypeName="DataSet1TableAdapters.AV_PROJECT_MSTTabl eAdapter"
DeleteMethod="Delete" InsertMethod="Insert"
OldValuesParameterFormatString="original_{0}" UpdateMethod="Update">
<DeleteParameters>
<asp:Parameter
Name="Original_APM_Project_ID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter
Name="APM_Project_Name" Type="String" />
<asp:Parameter
Name="APM_Project_Start_Date" Type="DateTime" />
<asp:Parameter
Name="APM_Project_End_Date" Type="DateTime" />
<asp:Parameter
Name="APM_Project_InCharge" Type="String" />
<asp:Parameter
Name="APM_Project_Desc" Type="String" />
<asp:Parameter Name="APM_RECADDID"
Type="String" />
<asp:Parameter
Name="APM_RECADDDATE" Type="DateTime" />
<asp:Parameter
Name="APM_RECUPDATEID" Type="String" />
<asp:Parameter
Name="APM_RECUPDATEDATE" Type="DateTime" />
<asp:Parameter
Name="Original_APM_Project_ID" Type="Int32" />
</UpdateParameters>
<SelectParameters>
<asp:Parameter Name="projectid"
Type="Int32" />
</SelectParameters>
<InsertParameters>
<asp:Parameter
Name="APM_Project_Name" Type="String" />
<asp:Parameter
Name="APM_Project_Start_Date" Type="DateTime" />
<asp:Parameter
Name="APM_Project_End_Date" Type="DateTime" />
<asp:Parameter
Name="APM_Project_InCharge" Type="String" />
<asp:Parameter
Name="APM_Project_Desc" Type="String" />
<asp:Parameter Name="APM_RECADDID"
Type="String" />
<asp:Parameter
Name="APM_RECADDDATE" Type="DateTime" />
<asp:Parameter
Name="APM_RECUPDATEID" Type="String" />
<asp:Parameter
Name="APM_RECUPDATEDATE" Type="DateTime" />
</InsertParameters>
</asp:ObjectDataSource>
<br />
</div>
</form></td>

In my vb file I'm doing the following
Dim userid As New ReportParameter("projectid", "2")
Dim p() As ReportParameter = {userid}
ReportViewer1.LocalReport.SetParameters(p)
ReportViewer1.LocalReport.Refresh()
Please help.
Thanks,
Vishal
Nov 3 '08 #1
1 9469
In the Report Design view, select your table and then select the upper
left corner (cell) of your table outline to change the outline of the
table to the fuzzy gray outline. Then right-click on that outline and
select Properties. In the Properties dialog window that comes up -
near the middle of the dialog where it says dataset - make sure that
your dataset is listed in that dropdown textbox. If your dataset is not
listed in the dropdown - try typing the name of the dataset in the
textbox. Save then run. If the dataset name IS listed and you still
don't have data - what you need to do is to physically drag a column
from the table that makes up the dataset.

Note: My experience with the Report control is that a table on the fly
(dynamic) table won't work. I had to create a table in a persistent
dataset (xsd). Create a table in the Dataset Designer (to get to the
dataset designer just right-click on the dataset xsd file and click on
"open") - create a table here - right-click and select "Add Table".
Then from that table - physically drag each column into each cell of
your Table control in the .rdlc. When you do this - you have to make
sure that the Report control is referencing the correct datasource.

Dim report As LocalReport = New LocalReport()

'--I copied myRpt.rdlc to ...Debug\bin using Project\Properties --
select the .rdlc file from the solution explorer - then select Build
Action = "Content" and Copy To Output Directory = "Copy Always"

report.ReportPath = Application.StartupPath & "\myRpt.rdlc"
report.DataSources.Add(New ReportDataSource("DataSet1_MyTbl",
Dataset1.MyTbl))

Save then run.

When you drag the column into the table cell - you should see text
something like this:

Text1
=Field!FirstName.Value
Text2
=Field!LastName.Value
...
Rich

*** Sent via Developersdex http://www.developersdex.com ***
Nov 3 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: dgk | last post by:
I'm trying to learn the ReportViewer using non-database data so I've run through the simple demo showing how to use the reportviewer with business objects:...
1
by: Rich | last post by:
Hello, I am trying to use the Reportviewer control. I have been following an example from the web, and the instructions from the help files on set up a ..rdlc and binding it to the reportviewer...
0
by: Rich | last post by:
Hello, I started using the Reportviewer control (very nice) for generating Reporting Services type reports in my VB2005 app. I have been experimenting using a designer Reportviewer control from...
1
by: foocc | last post by:
Hi everyone I wanna ask how to display on ReportViewer items filtered through BindingSource.Filter? Or are there any other ways for me to filter records and display on ReportViewer? Or is this...
10
by: AG | last post by:
I am trying to use a ReportViewer control in a VS 2005 web application project (not Website project). When I try to create a new report (local), I can't seem to find any method to create a...
1
by: Andy | last post by:
Hi there, I have an asp.net 2 application, and created a local report using MS ReportViewer. The report consists of a line chart, with date intervals on the x axis, and amounts of money in the y...
1
by: ajaykhedekar | last post by:
I am Showing Mulitple MSRS Reports on Single ASP.Net WEB Page using Mulitple ReportViewer Controls. If User wants to Print the Reports, then user has to click Print button provided by ReportViewer...
5
by: =?Utf-8?B?Y2hlY2tyYWlzZXJAY29tbXVuaXR5Lm5vc3BhbQ== | last post by:
I have a VS 2008 ASP.NET webform that has a reportview tag on it, accessing an .RLDC report in local report. The columns for the report are essentially: Month Item #1 Item#2 Item#3 ...
0
by: jankhana | last post by:
Hi all.... I'm using Microsoft ReportViewer(RDLC) for showing the reports. There are nearly six reports that i'm trying to create. First two are working propely i.e the reports get displayed but...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.