Click here to Skip to main content
15,917,473 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am writing an application that needs to run a reports, i created a report using SQL Report Builder 2.0.
and i created a test app like the following :

here is my code.
Dim query As String = "SELECT std_Info.std_ID,std_Info.std_Name_ar FROM std_Info"
        Dim reportDataSet As New DataSet
        Dim sqlAD As New SqlDataAdapter(query, conn)
        sqlAD.Fill(reportDataSet)
        Dim rds As New ReportDataSource("DataSet1",reportDataSet.Tables(0).TableName().ToString())

        Me.ReportViewer1.ProcessingMode = ProcessingMode.Local
        Me.ReportViewer1.LocalReport.LoadReportDefinition(New StreamReader("FULL PATH\test.rdl"))
        ReportViewer1.LocalReport.ReportPath = "FULL PATH\test.rdl"
        ReportViewer1.LocalReport.DataSources.Clear()
        ReportViewer1.LocalReport.DataSources.Add(rds)
        Me.ReportViewer1.RefreshReport()

so the problem is .. only the design of my report appears BUT NO DATA :(

Any Help PLZ ..
note .. i think that the application can not see the Data source of the report
Posted
Updated 18-Jul-11 22:58pm
v2

1 solution

the code you show is too poor. i don't konw what is reportviewer1? you can try to check your query
 
Share this answer
 
v2
Comments
rushdi obeidat 19-Jul-11 5:37am    
ReportViewer1 is the default name of the ReportViewer tool that exists in the VB ToolBox that will contains your report ... !!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900