20250526 报表打印

This commit is contained in:
毕文静 2025-06-26 17:15:06 +08:00
parent 96d3f45076
commit 7bf22fd500
5 changed files with 127 additions and 118 deletions

View File

@ -0,0 +1,41 @@
ALTER PROCEDURE [dbo].[HJGL_rpt_PipelineAttach]
(
@iso_id NVARCHAR(50)
)
AS
/**********淃커밗잿꼬밗돛데窟暠맒女(崎)************/
SELECT v.* FROM
(select ROW_NUMBER() OVER(ORDER BY report.Sort1,report.Sort2,report.Sort3,report.Sort4,report.Sort5) AS Number,report.* from
(SELECT JointInfo.JOT_ID,
JointInfo.ProjectId,
isoInfo.ISO_IsoNo,--
JointInfo.JOT_JointNo,--
JointInfo.Sort1,JointInfo.Sort2,JointInfo.Sort3,JointInfo.Sort4,JointInfo.Sort5,
JointInfo.JOT_CellWelder,
(CASE WHEN JointInfo.JOT_CellWelder!=JointInfo.JOT_FloorWelder THEN Welder1.WED_Code+'/'+Welder2.WED_Code ELSE Welder1.WED_Code END) AS WED_Code,--
JointInfo.JOT_JointDesc,--
(CASE WHEN Steel.STE_Code IS NOT NULL AND Steel1.STE_Code IS NOT NULL and Steel.STE_Code!=Steel1.STE_Code THEN Steel.STE_Code + '/' + Steel1.STE_Code
WHEN Steel.STE_Code IS NOT NULL THEN Steel.STE_Code ELSE ISNULL(Steel1.STE_Code,'') END) AS STE_Code, --
JointInfo.JOT_Location,--
(CASE WHEN IS_Proess= '1' THEN 'Y' ELSE 'N' END) AS IS_Proess, --
(select top 1 NDT_Code from HJGL_CH_TrustItem
left join HJGL_CH_Trust on HJGL_CH_Trust.CH_TrustID=HJGL_CH_TrustItem.CH_TrustID
left join HJGL_BS_NDTType on HJGL_BS_NDTType.NDT_ID = HJGL_CH_Trust.CH_NDTMethod
where HJGL_CH_TrustItem.JOT_ID = JointInfo.JOT_ID) as NDTCode --
FROM HJGL_PW_JointInfo AS JointInfo
LEFT JOIN HJGL_PW_IsoInfo AS isoInfo On isoInfo.ISO_ID = JointInfo.ISO_ID
LEFT JOIN HJGL_BS_Welder AS Welder1 ON Welder1.WED_ID = JointInfo.JOT_CellWelder
LEFT JOIN HJGL_BS_Welder AS Welder2 ON Welder2.WED_ID = JointInfo.JOT_FloorWelder
LEFT JOIN HJGL_BS_Steel AS Steel ON Steel.STE_ID=JointInfo.STE_ID
LEFT JOIN HJGL_BS_Steel AS Steel1 ON Steel1.STE_ID=JointInfo.STE_ID2
LEFT JOIN HJGL_BO_WeldReportMain AS WeldReportMain ON WeldReportMain.DReportID = JointInfo.DReportID
where JointInfo.ISO_ID=@iso_id
) report) v
order by v.Sort1,v.Sort2,v.Sort3,v.Sort4,v.Sort5
GO

View File

@ -74,7 +74,7 @@
<Items>
<f:Grid ID="Grid2" CssClass="blockpanel" ShowBorder="true" ShowHeader="true" EnableCollapse="false" runat="server"
DataKeyNames="ISO_ID" DataIDField="ISO_ID" AllowSorting="true" SortField="ISO_ID"
SortDirection="ASC" EnableCheckBoxSelect="true" EnableMultiSelect="false">
SortDirection="ASC" EnableCheckBoxSelect="true" EnableMultiSelect="true">
<Toolbars>
<f:Toolbar ID="Toolbar3" Position="Top" runat="server">
<Items>

View File

@ -292,7 +292,7 @@ namespace FineUIPro.Web.ContinuousPrint
if (tb.Rows.Count > 0)
{
CellRangeAddress region;
var pageNum = tb.Rows.Count < 31 ? 1 : Math.Ceiling((float)(tb.Rows.Count) / 31);
var pageNum = tb.Rows.Count < 29 ? 1 : Math.Ceiling((float)(tb.Rows.Count) / 28);
#region
//公共样式
@ -399,19 +399,7 @@ namespace FineUIPro.Web.ContinuousPrint
ws.GetRow(rowIndex + 2).GetCell(15).CellStyle = titleStyle;
#endregion
//}
//else
//{
// var pNum = (i + 1) * 31;
// //取数据开始和结束条数
// dStart = 31 + ((i - 3) * 31);
// dEnd = 31 + pNum;
// //数据开始行和结束行
// tStart = rowIndex;
// tEnd = rowIndex + 31;
//dStart = i == 1 ? 0 : (i - 1) * 31;
//dEnd = i * 31;
//}
#endregion
#region
@ -428,114 +416,114 @@ namespace FineUIPro.Web.ContinuousPrint
if (r == 0)
{
ws.GetRow(dataRow).GetCell(1).SetCellValue("1.");
ws.GetRow(dataRow).GetCell(2).SetCellValue("无缝钢管DN50 S40 20#8163");
ws.GetRow(dataRow).GetCell(5).SetCellValue("DN50");
ws.GetRow(dataRow).GetCell(6).SetCellValue("150米");
//ws.GetRow(dataRow).GetCell(2).SetCellValue("无缝钢管DN50 S40 20#8163");
//ws.GetRow(dataRow).GetCell(5).SetCellValue("DN50");
//ws.GetRow(dataRow).GetCell(6).SetCellValue("150米");
}
else if (r == 1)
{
ws.GetRow(dataRow).GetCell(1).SetCellValue("2.");
ws.GetRow(dataRow).GetCell(2).SetCellValue("无缝钢管DN25 S80 20#8163");
ws.GetRow(dataRow).GetCell(5).SetCellValue("DN25");
ws.GetRow(dataRow).GetCell(6).SetCellValue("0.5米");
//ws.GetRow(dataRow).GetCell(2).SetCellValue("无缝钢管DN25 S80 20#8163");
//ws.GetRow(dataRow).GetCell(5).SetCellValue("DN25");
//ws.GetRow(dataRow).GetCell(6).SetCellValue("0.5米");
}
else if (r == 2)
{
ws.GetRow(dataRow).GetCell(1).SetCellValue("3.");
ws.GetRow(dataRow).GetCell(2).SetCellValue("90°弯头DN50 S40 20#8163");
ws.GetRow(dataRow).GetCell(5).SetCellValue("DN50");
ws.GetRow(dataRow).GetCell(6).SetCellValue("11个");
//ws.GetRow(dataRow).GetCell(2).SetCellValue("90°弯头DN50 S40 20#8163");
//ws.GetRow(dataRow).GetCell(5).SetCellValue("DN50");
//ws.GetRow(dataRow).GetCell(6).SetCellValue("11个");
}
else if (r == 3)
{
ws.GetRow(dataRow).GetCell(1).SetCellValue("4.");
ws.GetRow(dataRow).GetCell(2).SetCellValue("异径三通DN100*50 S40 20#8163");
ws.GetRow(dataRow).GetCell(5).SetCellValue("DN100*50");
ws.GetRow(dataRow).GetCell(6).SetCellValue("1个");
//ws.GetRow(dataRow).GetCell(2).SetCellValue("异径三通DN100*50 S40 20#8163");
//ws.GetRow(dataRow).GetCell(5).SetCellValue("DN100*50");
//ws.GetRow(dataRow).GetCell(6).SetCellValue("1个");
}
else if (r == 4)
{
ws.GetRow(dataRow).GetCell(1).SetCellValue("5.");
ws.GetRow(dataRow).GetCell(2).SetCellValue("异径三通DN80*50 S40 20#8163");
ws.GetRow(dataRow).GetCell(5).SetCellValue("DN80*50");
ws.GetRow(dataRow).GetCell(6).SetCellValue("1个");
//ws.GetRow(dataRow).GetCell(2).SetCellValue("异径三通DN80*50 S40 20#8163");
//ws.GetRow(dataRow).GetCell(5).SetCellValue("DN80*50");
//ws.GetRow(dataRow).GetCell(6).SetCellValue("1个");
}
else if (r == 5)
{
ws.GetRow(dataRow).GetCell(1).SetCellValue("6.");
ws.GetRow(dataRow).GetCell(2).SetCellValue("异径三通DN50*25 S40 20#8163");
ws.GetRow(dataRow).GetCell(5).SetCellValue("DN50*25");
ws.GetRow(dataRow).GetCell(6).SetCellValue("1个");
//ws.GetRow(dataRow).GetCell(2).SetCellValue("异径三通DN50*25 S40 20#8163");
//ws.GetRow(dataRow).GetCell(5).SetCellValue("DN50*25");
//ws.GetRow(dataRow).GetCell(6).SetCellValue("1个");
}
else if (r == 6)
{
ws.GetRow(dataRow).GetCell(1).SetCellValue("7.");
ws.GetRow(dataRow).GetCell(2).SetCellValue("8字盲板 DN50 CL300 20#");
ws.GetRow(dataRow).GetCell(5).SetCellValue("DN50");
ws.GetRow(dataRow).GetCell(6).SetCellValue("1个");
//ws.GetRow(dataRow).GetCell(2).SetCellValue("8字盲板 DN50 CL300 20#");
//ws.GetRow(dataRow).GetCell(5).SetCellValue("DN50");
//ws.GetRow(dataRow).GetCell(6).SetCellValue("1个");
}
else if (r == 7)
{
ws.GetRow(dataRow).GetCell(1).SetCellValue("8.");
ws.GetRow(dataRow).GetCell(2).SetCellValue("盲盖 DN25 CL300");
ws.GetRow(dataRow).GetCell(5).SetCellValue("DN25");
ws.GetRow(dataRow).GetCell(6).SetCellValue("1个");
//ws.GetRow(dataRow).GetCell(2).SetCellValue("盲盖 DN25 CL300");
//ws.GetRow(dataRow).GetCell(5).SetCellValue("DN25");
//ws.GetRow(dataRow).GetCell(6).SetCellValue("1个");
}
else if (r == 8)
{
ws.GetRow(dataRow).GetCell(1).SetCellValue("9.");
ws.GetRow(dataRow).GetCell(2).SetCellValue("对焊法兰 DN50 CL300 S40 20#");
ws.GetRow(dataRow).GetCell(5).SetCellValue("DN50");
ws.GetRow(dataRow).GetCell(6).SetCellValue("6片");
//ws.GetRow(dataRow).GetCell(2).SetCellValue("对焊法兰 DN50 CL300 S40 20#");
//ws.GetRow(dataRow).GetCell(5).SetCellValue("DN50");
//ws.GetRow(dataRow).GetCell(6).SetCellValue("6片");
}
else if (r == 9)
{
ws.GetRow(dataRow).GetCell(1).SetCellValue("10.");
ws.GetRow(dataRow).GetCell(2).SetCellValue("承插焊法兰 DN20 CL300 S80 20#");
ws.GetRow(dataRow).GetCell(5).SetCellValue("DN25");
ws.GetRow(dataRow).GetCell(6).SetCellValue("2片");
//ws.GetRow(dataRow).GetCell(2).SetCellValue("承插焊法兰 DN20 CL300 S80 20#");
//ws.GetRow(dataRow).GetCell(5).SetCellValue("DN25");
//ws.GetRow(dataRow).GetCell(6).SetCellValue("2片");
}
else if (r == 10)
{
ws.GetRow(dataRow).GetCell(1).SetCellValue("11.");
ws.GetRow(dataRow).GetCell(2).SetCellValue("闸阀 DN50 CL300 WCB ANTI-H2S");
ws.GetRow(dataRow).GetCell(5).SetCellValue("DN50");
ws.GetRow(dataRow).GetCell(6).SetCellValue("3台");
//ws.GetRow(dataRow).GetCell(2).SetCellValue("闸阀 DN50 CL300 WCB ANTI-H2S");
//ws.GetRow(dataRow).GetCell(5).SetCellValue("DN50");
//ws.GetRow(dataRow).GetCell(6).SetCellValue("3台");
}
else if (r == 11)
{
ws.GetRow(dataRow).GetCell(1).SetCellValue("12.");
ws.GetRow(dataRow).GetCell(2).SetCellValue("闸阀 DN25 CL300 WCB ANTI-H2S");
ws.GetRow(dataRow).GetCell(5).SetCellValue("DN25");
ws.GetRow(dataRow).GetCell(6).SetCellValue("1台");
//ws.GetRow(dataRow).GetCell(2).SetCellValue("闸阀 DN25 CL300 WCB ANTI-H2S");
//ws.GetRow(dataRow).GetCell(5).SetCellValue("DN25");
//ws.GetRow(dataRow).GetCell(6).SetCellValue("1台");
}
else if (r == 12)
{
ws.GetRow(dataRow).GetCell(1).SetCellValue("13.");
ws.GetRow(dataRow).GetCell(2).SetCellValue("");
ws.GetRow(dataRow).GetCell(5).SetCellValue("");
ws.GetRow(dataRow).GetCell(6).SetCellValue("");
//ws.GetRow(dataRow).GetCell(2).SetCellValue("");
//ws.GetRow(dataRow).GetCell(5).SetCellValue("");
//ws.GetRow(dataRow).GetCell(6).SetCellValue("");
}
else if (r == 13)
{
ws.GetRow(dataRow).GetCell(1).SetCellValue("14.");
ws.GetRow(dataRow).GetCell(2).SetCellValue("");
ws.GetRow(dataRow).GetCell(5).SetCellValue("");
ws.GetRow(dataRow).GetCell(6).SetCellValue("");
//ws.GetRow(dataRow).GetCell(2).SetCellValue("");
//ws.GetRow(dataRow).GetCell(5).SetCellValue("");
//ws.GetRow(dataRow).GetCell(6).SetCellValue("");
}
else if (r == 14)
{
ws.GetRow(dataRow).GetCell(1).SetCellValue("15.");
ws.GetRow(dataRow).GetCell(2).SetCellValue("");
ws.GetRow(dataRow).GetCell(5).SetCellValue("");
ws.GetRow(dataRow).GetCell(6).SetCellValue("");
//ws.GetRow(dataRow).GetCell(2).SetCellValue("");
//ws.GetRow(dataRow).GetCell(5).SetCellValue("");
//ws.GetRow(dataRow).GetCell(6).SetCellValue("");
}
else if (r == 15)
{
ws.GetRow(dataRow).GetCell(1).SetCellValue("16.");
ws.GetRow(dataRow).GetCell(2).SetCellValue("");
ws.GetRow(dataRow).GetCell(5).SetCellValue("");
ws.GetRow(dataRow).GetCell(6).SetCellValue("");
//ws.GetRow(dataRow).GetCell(2).SetCellValue("");
//ws.GetRow(dataRow).GetCell(5).SetCellValue("");
//ws.GetRow(dataRow).GetCell(6).SetCellValue("");
}
else if (r == 16)
{
@ -596,68 +584,17 @@ namespace FineUIPro.Web.ContinuousPrint
ws.GetRow(dataRow).GetCell(10).CellStyle = styleList;
ws.GetRow(dataRow).GetCell(11).SetCellValue(pageTb.Rows[j]["JOT_JointDesc"].ToString());
ws.GetRow(dataRow).GetCell(11).CellStyle = styleList;
ws.GetRow(dataRow).GetCell(12).SetCellValue(pageTb.Rows[j]["STE_Name"].ToString());
ws.GetRow(dataRow).GetCell(12).SetCellValue(pageTb.Rows[j]["STE_Code"].ToString());
ws.GetRow(dataRow).GetCell(12).CellStyle = styleList;
ws.GetRow(dataRow).GetCell(13).SetCellValue(pageTb.Rows[j]["JOT_Location"].ToString());
ws.GetRow(dataRow).GetCell(13).CellStyle = styleList;
ws.GetRow(dataRow).GetCell(14).SetCellValue(pageTb.Rows[j]["IS_Proess"].ToString());
ws.GetRow(dataRow).GetCell(14).CellStyle = styleList;
ws.GetRow(dataRow).GetCell(15).SetCellValue("");
ws.GetRow(dataRow).GetCell(15).SetCellValue(pageTb.Rows[j]["NDTCode"].ToString());
ws.GetRow(dataRow).GetCell(15).CellStyle = styleList;
}
#endregion
#region
//ws = ExcelCreateRowBottom(ws, hssfworkbook, tEnd + 1, tEnd + 12, style, 1, 6);
//region = new CellRangeAddress(tEnd + 1, tEnd + 6, 1, 6);
//ws.GetRow(tEnd + 1).GetCell(1).SetCellValue("说明:");
//ws.GetRow(tEnd + 1).GetCell(1).CellStyle = leftstyle;
//region = new CellRangeAddress(tEnd + 8, tEnd + 8, 1, 6);
//ws.GetRow(tEnd + 8).GetCell(1).SetCellValue("浙江鼎盛石化工程有限公司");
//ws.GetRow(tEnd + 8).GetCell(1).CellStyle = style;
//region = new CellRangeAddress(tEnd + 9, tEnd + 9, 1, 2);
//ws.GetRow(tEnd + 9).GetCell(1).SetCellValue("工程名称");
//ws.GetRow(tEnd + 9).GetCell(1).CellStyle = style;
//region = new CellRangeAddress(tEnd + 9, tEnd + 9, 3, 6);
//ws.GetRow(tEnd + 9).GetCell(3).SetCellValue(BLL.Base_ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectName);
//ws.GetRow(tEnd + 9).GetCell(3).CellStyle = style;
//region = new CellRangeAddress(tEnd + 10, tEnd + 10, 1, 2);
//ws.GetRow(tEnd + 10).GetCell(1).SetCellValue("施工图号");
//ws.GetRow(tEnd + 10).GetCell(1).CellStyle = style;
//region = new CellRangeAddress(tEnd + 10, tEnd + 10, 3, 6);
//ws.GetRow(tEnd + 10).GetCell(3).SetCellValue("");
//ws.GetRow(tEnd + 10).GetCell(3).CellStyle = style;
//region = new CellRangeAddress(tEnd + 11, tEnd + 11, 1, 2);
//ws.GetRow(tEnd + 11).GetCell(1).SetCellValue("管线编号");
//ws.GetRow(tEnd + 11).GetCell(1).CellStyle = style;
//ws.GetRow(tEnd + 11).GetCell(3).SetCellValue("");
//ws.GetRow(tEnd + 11).GetCell(3).CellStyle = style;
//ws.GetRow(tEnd + 11).GetCell(4).SetCellValue("绘制");
//ws.GetRow(tEnd + 11).GetCell(4).CellStyle = style;
//region = new CellRangeAddress(tEnd + 11, tEnd + 11, 5, 6);
//ws.GetRow(tEnd + 11).GetCell(5).SetCellValue("");
//ws.GetRow(tEnd + 11).GetCell(5).CellStyle = style;
//region = new CellRangeAddress(tEnd + 12, tEnd + 12, 1, 3);
//ws.GetRow(tEnd + 12).GetCell(1).SetCellValue("管 道 轴 测 图 附 页");
//ws.GetRow(tEnd + 12).GetCell(1).CellStyle = style;
//region = new CellRangeAddress(tEnd + 12, tEnd + 12, 4, 6);
//ws.GetRow(tEnd + 12).GetCell(4).SetCellValue("");
//ws.GetRow(tEnd + 12).GetCell(4).CellStyle = style;
#endregion
rowIndex = tEnd + 2;
}
}

View File

@ -1 +1,32 @@


错误信息开始=====>
错误类型:SqlException
错误信息:在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: SQL Network Interfaces, error: 26 - 定位指定的服务器/实例时出错)
错误堆栈:
在 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager)
在 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
在 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
在 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
在 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
在 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
在 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
在 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
在 System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
在 System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
在 System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
在 System.Data.SqlClient.SqlConnection.Open()
在 System.Data.Linq.SqlClient.SqlConnectionManager.UseConnection(IConnectionUser user)
在 System.Data.Linq.SqlClient.SqlProvider.get_IsSqlCe()
在 System.Data.Linq.SqlClient.SqlProvider.InitializeProviderMode()
在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
在 System.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression)
在 BLL.Sys_UserService.UserLogOn(String account, String password, Boolean rememberMe, Page page) 位置 E:\鼎盛\HJGL_DS\HJGL_DS\BLL\Common\SysManage\Sys_UserService.cs:行号 39
在 FineUIPro.Web.Login.btnLogin_Click(Object sender, EventArgs e) 位置 E:\鼎盛\HJGL_DS\HJGL_DS\FineUIPro.Web\Login.aspx.cs:行号 52
在 FineUIPro.Button.OnClick(EventArgs e)
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
出错时间:06/26/2025 10:36:58
出错文件:http://localhost:64304/Login.aspx
IP地址:::1
出错时间:06/26/2025 10:36:58

View File

@ -11,7 +11,7 @@
<FineUIPro DebugMode="false" Theme="Cupertino"/>
<appSettings>
<!--连接字符串-->
<add key="ConnectionString" value="Server=.\MSSQLSERVER01;Database=HJGLDB_DS;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Max Pool Size = 1000;Connect Timeout=1200"/>
<add key="ConnectionString" value="Server=.\SQL2022;Database=HJGLDB_DS;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Max Pool Size = 1000;Connect Timeout=1200"/>
<!--系统名称-->
<add key="SystemName" value="诺必达焊接管理系统"/>
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>