After creating a report, No data is polluted



I have added report1,created dataset and priview control in vb win form
and created a report using this dataset.

I use this code to show.

Dim Ds As New DataSet
Dim Adpt As New SqlDataAdapter

Adpt = New SqlDataAdapter("Select * from Vw_Rpt_Fee ", con)
Ds.Clear()
Adpt.Fill(Ds)
Report1.Load("..\..\Rpt_ReceiptTax.frx")
Report1.Clear()
Report1.RegisterData(Ds)
Report1.Prepare()
Report1.Preview = PreviewControl1
Report1.Show()

but when i run report no data comes ,please tell me what is the problem.

thanks.

Comments

  • edited 12:27PM
    You should also enable some table from dataset to use it in the report. C# code:
    Report1.RegisterData(ds);
    Report1.GetDataSource("SomeTableName").Enabled = true;
    
    Look at the demo ReportFromCode to take more information.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.