Hello experts RRS feed

  • Question

  • User273232671 posted

    Hello Experts, I am starting my new career with ASP.NET, and i have just finished the first web form that i was asked to create, BUT, after creating it using a table in the data base that is showed and managed in a GridView, i was asked to generate a report, and a chart, as a summary of my entries, and when i took my Microsoft .Net class, they didnt talk about reporting at all, so i really have no idea if this can be achieved throught Microsoft Visual Studio 2010 or not, but i think it showld be, can any one help me please by at least giving me a hint or a link to help me out? or at least what method or tool do i have to use in order to make the report? but in VB.NET please, and thanx alot in advance...

    Friday, December 2, 2011 5:10 AM

All replies

  • User-60558687 posted

    You can create a local report (in the toolbox find a ReportViewer control and add it to your page) and this will give you a rich functionality. Search for ReportViewer local processing or read this http://msdn.microsoft.com/en-us/library/ms251704(v=VS.100).aspx and the suggested pages.

    Another approach is to use the chart controls  

    You can get started here http://weblogs.asp.net/scottgu/archive/2008/11/24/new-asp-net-charting-control-lt-asp-chart-runat-quot-server-quot-gt.aspx

    Friday, December 2, 2011 7:59 AM
  • User455156504 posted


    additional to the good points in the post above: If you have to design the report yourself and your using SQL Server you should have a look at SQL Server Reporting Services (SSRS). Some good tutorials could be found on the following site - http://msdn.microsoft.com/en-us/library/bb522859.aspx

    Friday, December 2, 2011 8:14 AM
  • User273232671 posted

    Ok thanx alot every body for the great help, i managed to create my .rdlc reporting file and added it to my web form and worked greatly, now the problem is that i when i created the dataset and chose the column that i want to include in the report, it came very clearly and nicely, but how do i put a condition!! like i dont want the whole table data to be populated into the report, i want for example to show all records in the table for a scpecific date, i have a date column of course, i want the user to chose 2 dates(starting and ending) and the report gets generated upon that, can any one please tell me how to do that!!


    for example, if i wanna say that in SQL statements it would be like this:

    SELECT * from MyTable where date => TextBox1.Text AND date =< TextBox2.Text


    i tried so much to put the condition in the report but i only reached a dead end, can any one help me please? and thank you.

    Saturday, December 3, 2011 12:47 AM
  • User273232671 posted

    Ok, I beleive that one way to do so is through parameters, i added 2 parameters in my Report Wizard and fixed my selext statement to show where date >= @param1 and date <= @param2


    but how to call those parameters and how to call my ReportViewer in my .aspx code behind page? please help...

    Saturday, December 3, 2011 4:47 AM
  • User-60558687 posted

    Yes you can parameters to let the user control the filtering. 

    For now check out this walkthrough http://technet.microsoft.com/en-us/library/aa337091(SQL.90).aspx and also browse the available ReportView control's events.


    Saturday, December 3, 2011 10:35 AM