質問編集履歴
4
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -431,3 +431,11 @@
|
|
431
431
|
![イメージ説明](b67f0890358c7de8fd7c8bc351a7a3b4.png)
|
432
432
|
|
433
433
|
となりました。
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
|
438
|
+
|
439
|
+
このようなエラーになり最初から作り直しで行きたいと思います。
|
440
|
+
|
441
|
+
![イメージ説明](0ce8dc449fbaa83c6d757e4f0c7414cc.png)
|
3
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -399,3 +399,35 @@
|
|
399
399
|
ASP.NET のバージョンは確認中です
|
400
400
|
|
401
401
|
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
|
402
|
+
|
403
|
+
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
以下を確認しました。
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
対象のフレームワークは、「.NET Framework 4.5.2」となっています。
|
412
|
+
|
413
|
+
|
414
|
+
|
415
|
+
row[0] = "<a href = 'ByoriIitakForm.aspx'>" + dat.Value.DrMei + "</a>";
|
416
|
+
|
417
|
+
とした時、
|
418
|
+
|
419
|
+
![イメージ説明](353e5e3f3eff274858c49a0b86fac3dc.png)
|
420
|
+
|
421
|
+
上記のような結果になりました。
|
422
|
+
|
423
|
+
|
424
|
+
|
425
|
+
また、
|
426
|
+
|
427
|
+
row[0] = HttpUtility.HtmlEncode("<a href = 'ByoriIitakForm.aspx'>")+ dat.Value.DrMei + HttpUtility.HtmlEncode("</a>");
|
428
|
+
|
429
|
+
の時は、
|
430
|
+
|
431
|
+
![イメージ説明](b67f0890358c7de8fd7c8bc351a7a3b4.png)
|
432
|
+
|
433
|
+
となりました。
|
2
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -98,6 +98,304 @@
|
|
98
98
|
|
99
99
|
|
100
100
|
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
```C#
|
106
|
+
|
107
|
+
public DataTable MakeItak()
|
108
|
+
|
109
|
+
{
|
110
|
+
|
111
|
+
DataTable table;
|
112
|
+
|
113
|
+
string doc = (string)Session["ItakDocMei"]; // 名前が入る
|
114
|
+
|
115
|
+
string doc2 = doc.Replace(" ", "");
|
116
|
+
|
117
|
+
doc2 = doc2.Replace(" ", "");
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
if (doc2 == "全員")
|
122
|
+
|
123
|
+
table = MakeItakByoriIList();
|
124
|
+
|
125
|
+
else
|
126
|
+
|
127
|
+
table = MakeItakByoriI();
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
return table;
|
132
|
+
|
133
|
+
}
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
public DataTable MakeItakByoriIList(/*IEnumerable<AllocationTable> alloc*/)
|
138
|
+
|
139
|
+
{
|
140
|
+
|
141
|
+
// 売上一覧は、指定月から1年間表示する
|
142
|
+
|
143
|
+
int pos = 1; // Array.IndexOf(tsuki, tsu);
|
144
|
+
|
145
|
+
//string[] tsuki = { "", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14" };
|
146
|
+
|
147
|
+
string[] lists = { " 名前 ", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", " 合 計" };
|
148
|
+
|
149
|
+
string[] header = { "user", "day11", "day12",
|
150
|
+
|
151
|
+
"day13", "day14", "day15", "day16", "day17", "day18", "day19", "day20", "day21", "day22", "day23", "day24", "day25",
|
152
|
+
|
153
|
+
"day26", "day27", "day28", "day29", "day30", "day31", "day01", "day02", "day03", "day04", "day05", "day06", "day07", "day08", "day09", "day10", "day32" };
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
DataRow row;
|
158
|
+
|
159
|
+
int[] ryokin = new int[header.Length];
|
160
|
+
|
161
|
+
int sNen = DateTime.Now.Year;
|
162
|
+
|
163
|
+
DataTable table = new DataTable();
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
for (int i = 0; i < lists.Length; i++)
|
168
|
+
|
169
|
+
{
|
170
|
+
|
171
|
+
DataColumn col = new DataColumn();
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
col.DataType = Type.GetType("System.String");
|
176
|
+
|
177
|
+
col.ColumnName = header[i];
|
178
|
+
|
179
|
+
col.Caption = lists[i];
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
table.Columns.Add(col);
|
184
|
+
|
185
|
+
}
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
string date = (string)Session["Itak"]; // 日付 202011 を取得
|
190
|
+
|
191
|
+
var alloc = GetByoriIData(date); // 上記日付のデータ取得
|
192
|
+
|
193
|
+
ShukeiAll(alloc); // 上記で取得した日付を表示用に集計
|
194
|
+
|
195
|
+
// GetByoriIData() と ShukeiAll() は問題ないので割愛します。データはDBより取得
|
196
|
+
|
197
|
+
// details は、上記での集計結果が入っています。
|
198
|
+
|
199
|
+
foreach (var dat in details)
|
200
|
+
|
201
|
+
{
|
202
|
+
|
203
|
+
row = table.NewRow();
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
HyperLink lnk = new HyperLink();
|
208
|
+
|
209
|
+
// 自分自身
|
210
|
+
|
211
|
+
string txt = (string)Session["myAdress"] + "/ByoriIItakuForm.aspx";
|
212
|
+
|
213
|
+
lnk.NavigateUrl = txt;
|
214
|
+
|
215
|
+
lnk.Text = dat.Value.DrMei;
|
216
|
+
|
217
|
+
//LinkButton lnk = new LinkButton();
|
218
|
+
|
219
|
+
//lnk.PostBackUrl = txt;
|
220
|
+
|
221
|
+
//lnk.Text = dat.Value.DrMei;
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
row[0] = HttpUtility.HtmlEncode("<a href = 'ByoriIitakForm.aspx'>")+ dat.Value.DrMei + HttpUtility.HtmlEncode("</a>");
|
226
|
+
|
227
|
+
//row[0] = lnk; //dat.Value.DrMei;
|
228
|
+
|
229
|
+
row[1] = dat.Value.day11;
|
230
|
+
|
231
|
+
row[2] = dat.Value.day12;
|
232
|
+
|
233
|
+
row[3] = dat.Value.day13;
|
234
|
+
|
235
|
+
row[4] = dat.Value.day14;
|
236
|
+
|
237
|
+
row[5] = dat.Value.day15;
|
238
|
+
|
239
|
+
row[6] = dat.Value.day16;
|
240
|
+
|
241
|
+
row[7] = dat.Value.day17;
|
242
|
+
|
243
|
+
row[8] = dat.Value.day18;
|
244
|
+
|
245
|
+
row[9] = dat.Value.day19;
|
246
|
+
|
247
|
+
row[10] = dat.Value.day20;
|
248
|
+
|
249
|
+
row[11] = dat.Value.day21;
|
250
|
+
|
251
|
+
row[12] = dat.Value.day22;
|
252
|
+
|
253
|
+
row[13] = dat.Value.day23;
|
254
|
+
|
255
|
+
row[14] = dat.Value.day24;
|
256
|
+
|
257
|
+
row[15] = dat.Value.day25;
|
258
|
+
|
259
|
+
row[16] = dat.Value.day26;
|
260
|
+
|
261
|
+
row[17] = dat.Value.day27;
|
262
|
+
|
263
|
+
row[18] = dat.Value.day28;
|
264
|
+
|
265
|
+
row[19] = dat.Value.day29;
|
266
|
+
|
267
|
+
row[20] = dat.Value.day30;
|
268
|
+
|
269
|
+
row[21] = dat.Value.day31;
|
270
|
+
|
271
|
+
row[22] = dat.Value.day01;
|
272
|
+
|
273
|
+
row[23] = dat.Value.day02;
|
274
|
+
|
275
|
+
row[24] = dat.Value.day03;
|
276
|
+
|
277
|
+
row[25] = dat.Value.day04;
|
278
|
+
|
279
|
+
row[26] = dat.Value.day05;
|
280
|
+
|
281
|
+
row[27] = dat.Value.day06;
|
282
|
+
|
283
|
+
row[28] = dat.Value.day07;
|
284
|
+
|
285
|
+
row[29] = dat.Value.day08;
|
286
|
+
|
287
|
+
row[30] = dat.Value.day09;
|
288
|
+
|
289
|
+
row[31] = dat.Value.day10;
|
290
|
+
|
291
|
+
row[32] = Gokei(dat.Value) + "(" + Gokei2(dat.Value) + ")";
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
table.Rows.Add(row);
|
296
|
+
|
297
|
+
}
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
int nn = table.Rows.Count;
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
return table;
|
306
|
+
|
307
|
+
}
|
308
|
+
|
309
|
+
```
|
310
|
+
|
311
|
+
```ここに言語を入力
|
312
|
+
|
313
|
+
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ByoriIItakuForm.aspx.cs" Inherits="WebHoken.ByoriIItakuForm" %>
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
<!DOCTYPE html>
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
326
|
+
|
327
|
+
<head runat="server">
|
328
|
+
|
329
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
330
|
+
|
331
|
+
<title></title>
|
332
|
+
|
333
|
+
</head>
|
334
|
+
|
335
|
+
<body>
|
336
|
+
|
337
|
+
<form id="form1" runat="server">
|
338
|
+
|
339
|
+
<asp:ScriptManager ID="ScriptManager1" runat="server">
|
340
|
+
|
341
|
+
</asp:ScriptManager>
|
342
|
+
|
343
|
+
<div class="row">
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
<div>
|
348
|
+
|
349
|
+
<p>
|
350
|
+
|
351
|
+
<asp:TextBox ID="TextBox1" Font-Size="Medium" Width="350" runat="server" Text=""></asp:TextBox>
|
352
|
+
|
353
|
+
</p>
|
354
|
+
|
355
|
+
<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt" WaitMessageFont-Names="Verdana"
|
356
|
+
|
357
|
+
WaitMessageFont-Size="14pt" Width="1920px" Height="700px">
|
358
|
+
|
359
|
+
<localreport reportpath="ReportItakuDoctor2.rdlc">
|
360
|
+
|
361
|
+
<DataSources>
|
362
|
+
|
363
|
+
<rsweb:ReportDataSource DataSourceId="ObjectDataSource2" Name="DataSet1" />
|
364
|
+
|
365
|
+
</DataSources>
|
366
|
+
|
367
|
+
</localreport>
|
368
|
+
|
369
|
+
</rsweb:ReportViewer>
|
370
|
+
|
371
|
+
|
372
|
+
|
373
|
+
<asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="MakeItak" TypeName="WebHoken.ByoriIItakuForm" OldValuesParameterFormatString="original_{0}"></asp:ObjectDataSource>
|
374
|
+
|
375
|
+
</div>
|
376
|
+
|
377
|
+
</div>
|
378
|
+
|
379
|
+
</form>
|
380
|
+
|
381
|
+
</body>
|
382
|
+
|
383
|
+
</html>
|
384
|
+
|
385
|
+
```
|
386
|
+
|
387
|
+
ReportItakuDoctor2.rdlc も載せようとしましたが、コードが長くアップロードの失敗しました。
|
388
|
+
|
389
|
+
見たい個所があれば教えてください。
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
また、ASP.NET のバージョンはどこを見ればわかるでしょうか?
|
394
|
+
|
395
|
+
教えてください。
|
396
|
+
|
397
|
+
|
398
|
+
|
101
399
|
ASP.NET のバージョンは確認中です
|
102
400
|
|
103
401
|
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
|
1
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -95,3 +95,9 @@
|
|
95
95
|
|
96
96
|
|
97
97
|
Windows10 ASP.NET C# VS2015
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
ASP.NET のバージョンは確認中です
|
102
|
+
|
103
|
+
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
|