Visual studio 會出現
TF30063: 您未取得存取 abc.visualstudio.com\project 的授權。
重新登入即可。
#region 報表繫結(下載) | |
/// <summary> | |
/// 報表繫結 | |
/// </summary> | |
/// <param name="rpt">報表檢視器</param> | |
/// <param name="dsName">資料集名稱</param> | |
/// <param name="RptPath">報表路徑</param> | |
/// <param name="dt">繫結之資料表</param> | |
/// <param name="PType">PDF,Excel,Word,Image</param> | |
public static void ReportExport(ReportViewer rpt, string dsName, string RptPath, DataTable dt, string PType) | |
{ | |
ReportBind(rpt, dsName, RptPath, dt); | |
Microsoft.Reporting.WebForms.Warning[] tWarnings; | |
string[] tStreamids; | |
string tMimeType; | |
string tEncoding; | |
string tExtension; | |
//呼叫ReportViewer.LoadReport的Render function,將資料轉成想要轉換的格式,並產生成Byte資料 | |
byte[] tBytes = rpt.LocalReport.Render(PType, null, out tMimeType, out tEncoding, out tExtension, out tStreamids, out tWarnings); | |
//將Byte內容寫到Client | |
string DisplayName = rpt.LocalReport.DisplayName == "" ? "report" : rpt.LocalReport.DisplayName; | |
if (HttpContext.Current.Request.Browser.Browser == "IE") | |
{ | |
DisplayName = HttpContext.Current.Server.UrlPathEncode(DisplayName); | |
} | |
HttpContext.Current.Response.Clear(); | |
HttpContext.Current.Response.ContentType = tMimeType; | |
HttpContext.Current.Response.AppendHeader("Content-Disposition", String.Format("attachment; filename={0}.{1}", DisplayName, tExtension)); | |
HttpContext.Current.Response.BinaryWrite(tBytes); | |
HttpContext.Current.Response.End(); | |
} | |
#endregion | |
#region 報表繫結 | |
/// <summary> | |
/// 報表繫結 | |
/// </summary> | |
/// <param name="rpt">報表檢視器</param> | |
/// <param name="dsName">資料集名稱</param> | |
/// <param name="RptPath">報表路徑</param> | |
/// <param name="dt">繫結之資料表</param> | |
public static void ReportBind(ReportViewer rpt, string dsName, string RptPath, DataTable dt) | |
{ | |
string Path = ConfigurationManager.AppSettings["RptPath"].ToStr(); | |
Path = (Path == "") ? "~/bin/Report" : Path;//預設值 | |
rpt.LocalReport.DataSources.Clear(); | |
rpt.ProcessingMode = ProcessingMode.Local; | |
rpt.LocalReport.ReportPath = HttpContext.Current.Server.MapPath(string.Format("{0}\\{1}", Path, RptPath)); | |
rpt.LocalReport.DataSources.Add(new ReportDataSource(dsName, dt)); | |
rpt.LocalReport.Refresh(); | |
} | |
#endregion |
參考:
[SessionState(System.Web.SessionState.SessionStateBehavior.Disabled)]public class HomeController : Controller
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>20170601demo</title> | |
<script src="https://code.jquery.com/jquery-1.10.2.js"></script> | |
<script> | |
$(function(){ | |
$('input').click(function(){ | |
alert('123'); | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<input type='button' value='show' /> | |
</body> | |
</html> |
參考網址:
ex:
第一列為Title:
第二列儲存格中鍵入:
=ImportFeed("http://kylesheng.blogspot.com/feeds/posts/default","items title", FALSE, 12)=ImportFeed("http://kylesheng.blogspot.com/feeds/posts/default","items url", FALSE, 12)
=ImportFeed("http://kylesheng.blogspot.com/feeds/posts/default","items summary", FALSE, 12)
系統便會帶出rss的資訊。
延伸:
如果想要將此sheet公開為可讀取的rss文件。
Demo:
https://docs.google.com/spreadsheets/d/1z3W2Y5G1Ea7GBttaVqCGS8w9NbdnihsUiLxOtjH0w/pubhtml
取得Sheet Rss Link:
相關文章:
¨C12C
¨C13C
¨C14C
¨C15C
在Chrome 55版本,Html5 Video Tag 會預設出現下載按鈕,(或許之後會移除?)。
可以透過CSS解決:
video::-internal-media-controls-download-button {
display:none;
}
video::-webkit-media-controls-enclosure {
overflow:hidden;
}
video::-webkit-media-controls-panel {
width: calc(100% + 30px); /* Adjust as needed */
}
在此做個筆記。