Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > ASP.NET > ASP.NET Data Control > ASP.NET ReportViewer - rsweb:ReportViewer



Clound SSD Virtual Server

ASP.NET ReportViewer - rsweb:ReportViewer

ASP.NET ReportViewer - rsweb:ReportViewer เป็น Control ที่ใช้สำหรับสร้างและออกแบบรายงาน (Report) บน ASP.NET รองรับการใช้งานกับ Database หลายตัว โดยการเลือกรูปแบบของ DataSource จาก Control ต่าง ๆ ของ .NET Framework ก็สามารถสร้างรายงานแสดงผลบนเว็บไซต์ ASP.NET ได้ในพริบตา ใช้งานง่ายและสะดวกมาก ๆ

Framework : 2,3,4


ASP.NET ReportViewer

Syntax

<rsweb:ReportViewer ID="myReportViewer" runat="server"></rsweb:ReportViewer>


ASP.NET ReportViewer

เริ่มจากการลาก Report มาไว้ในส่วนของ Web Form

ASP.NET ReportViewer

สามารถเลือก Report ที่มีอยู่ใน Project หรือทำการคลิกที่ Design a new report...

ASP.NET ReportViewer

เลือกที่ New Connection...

ASP.NET ReportViewer

เลือก Driver ของ Microsoft Access Database File (OLE DB)

ASP.NET ReportViewer

เลือก Connection..








ASP.NET ReportViewer

ตั้งชื่อ Connection String

ASP.NET ReportViewer

เลือกตารางที่จะออกรายงาน

ASP.NET ReportViewer

กำหนดค่าของฟิวด์

ASP.NET ReportViewer

คุณสมับติของฟิวด์

ASP.NET ReportViewer

ตัวอย่าง Report

ASP.NET ReportViewer

และเลือก Finish

ASP.NET ReportViewer

เลือก Report ที่ได้ทำการสร้างไปแล้ว

ASP.NET ReportViewer

เพิ่ม ScriptManager เข้ามาใน Web Form


ASP.NET ReportViewer

ทดสอบการรัน Report จะได้ผลลัพธ์ดังรูป

สำหรับ Code นี้สามารถใช้ได้ทั้ง VB.NET และ C#

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Reportviewer.aspx.vb" Inherits="Reportviewer" %>

<%@ 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>ThaiCreate.Com Tutorial</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" 
            Font-Size="8pt" InteractiveDeviceInfos="(Collection)" 
            WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt" Width="643px" 
            Height="329px">
            <LocalReport ReportPath="Report1.rdlc">
                <DataSources>
                    <rsweb:ReportDataSource DataSourceId="ObjectDataSource1" Name="DataSet1" />
                </DataSources>
            </LocalReport>
        </rsweb:ReportViewer>
        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
            SelectMethod="GetData" 
            TypeName="mydatabaseDataSetTableAdapters.customerTableAdapter">
        </asp:ObjectDataSource>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
    
    </div>
    </form>
</body>
</html>









บทความอื่น ๆ ที่เกี่ยวข้อง
Go to : การสร้าง Report ด้วย Report Viewer และการส่งค่า Parameters (ReportViewer , MicrosoftReportViewer)
Go to : ReportViewer and DataSet การสร้าง การสร้าง DataSource ด้วย DataSet และแสดงผลบน ReportViewer

   
Share


ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท


ลองใช้ค้นหาข้อมูล


   


Bookmark.   
       
  By : ThaiCreate.Com Team (บทความเป็นลิขสิทธิ์ของเว็บไทยครีเอทห้ามนำเผยแพร่ ณ เว็บไซต์อื่น ๆ)
  Score Rating :  
  Create/Update Date : 2008-11-22 07:31:53 / 2017-03-28 21:53:44
  Download : Download  ASP.NET ReportViewer - rsweb:ReportViewer
 Sponsored Links / Related

 
ASP.NET Data Control
Rating :

 
ASP.NET SqlDataSource - asp:SqlDataSource
Rating :

 
ASP.NET AccessDataSource - asp:AccessDataSource
Rating :

 
ASP.NET ObjectDataSource - asp:ObjectDataSource
Rating :

 
ASP.NET XmlDataSource - asp:XmlDataSource
Rating :

 
ASP.NET SiteMapDataSource - asp:SiteMapDataSource
Rating :

 
ASP.NET DataPager - asp:DataPager
Rating :

 
ASP.NET LinqDataSource - asp:LinqDataSource
Rating :

 
ASP.NET Chart - asp:Chart
Rating :

 
ASP.NET QueryExtender - asp:QueryExtender
Rating :

 
ASP.NET EntityDataSource - asp:EntityDataSource
Rating :


ThaiCreate.Com Forum


Comunity Forum Free Web Script
Jobs Freelance Free Uploads
Free Web Hosting Free Tools

สอน PHP ผ่าน Youtube ฟรี
สอน Android การเขียนโปรแกรม Android
สอน Windows Phone การเขียนโปรแกรม Windows Phone 7 และ 8
สอน iOS การเขียนโปรแกรม iPhone, iPad
สอน Java การเขียนโปรแกรม ภาษา Java
สอน Java GUI การเขียนโปรแกรม ภาษา Java GUI
สอน JSP การเขียนโปรแกรม ภาษา Java
สอน jQuery การเขียนโปรแกรม ภาษา jQuery
สอน .Net การเขียนโปรแกรม ภาษา .Net
Free Tutorial
สอน Google Maps Api
สอน Windows Service
สอน Entity Framework
สอน Android
สอน Java เขียน Java
Java GUI Swing
สอน JSP (Web App)
iOS (iPhone,iPad)
Windows Phone
Windows Azure
Windows Store
Laravel Framework
Yii PHP Framework
สอน jQuery
สอน jQuery กับ Ajax
สอน PHP OOP (Vdo)
Ajax Tutorials
SQL Tutorials
สอน SQL (Part 2)
JavaScript Tutorial
Javascript Tips
VBScript Tutorial
VBScript Validation
Microsoft Access
MySQL Tutorials
-- Stored Procedure
MariaDB Database
SQL Server Tutorial
SQL Server 2005
SQL Server 2008
SQL Server 2012
-- Stored Procedure
Oracle Database
-- Stored Procedure
SVN (Subversion)
แนวทางการทำ SEO
ปรับแต่งเว็บให้โหลดเร็ว


Hit Link
   







Load balance : Server 05
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่