RDLC(六)_如何在圖片安插文字_文字如何垂直呈現(類似姓名貼紙應用)
https://www.hkiou.com/product_list?mcat=name_ticket
在RDLC檔案中簡單用很久之前用過的DataSet和表格佈局
aspx.vb
code-behind部分就是直接塞一個DataTable給它
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | Imports Microsoft.Reporting.WebForms Public Class 光明燈列印 Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Page.IsPostBack = False Then Dim dtLightUser As New DataTable dtLightUser.Columns.Add("UserName") 'Dim dr As DataRow = dtLightUser.NewRow 'dr("UserName") = "劉銘傳" 'dtLightUser.Rows.Add(dr) For idx = 0 To 4 Dim dr As DataRow = dtLightUser.NewRow dr("UserName") = "劉銘傳" dtLightUser.Rows.Add(dr) Next Dim rds As ReportDataSource = New ReportDataSource("DataSet1", dtLightUser) Me.rpt_光明燈.LocalReport.DataSources.Clear() Me.rpt_光明燈.LocalReport.DataSources.Add(rds) Me.rpt_光明燈.LocalReport.Refresh() End If End Sub End Class |
aspx
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="光明燈列印.aspx.vb" Inherits="WebApplication1.光明燈列印" %> <%@ Register Assembly="Microsoft.ReportViewer.WebForms" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title></title> </head> <body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> <div> <rsweb:reportviewer runat="server" ID="rpt_光明燈" ProcessingMode="Local" ZoomMode="FullPage" SizeToReportContent="true" > <LocalReport ReportPath="PrintTemplate\光明燈_列印.rdlc"> </LocalReport> </rsweb:reportviewer> </div> </form> </body> </html> |
那要打直的而且不只一個人名怎麼辦
留言
張貼留言