<?xml version="1.0" encoding="UTF-8"?>
<ActiveReportsLayout Version="3.1" PrintWidth="11895" DocumentName="ARNet Document" ScriptLang="VB.NET" MasterReport="0">
  <StyleSheet>
    <Style Name="Normal" Value="font-family: Arial; font-style: normal; text-decoration: none; font-weight: normal; font-size: 10pt; color: Black; ddo-char-set: 204" />
    <Style Name="Heading1" Value="font-size: 16pt; font-weight: bold" />
    <Style Name="Heading2" Value="font-family: Times New Roman; font-size: 14pt; font-weight: bold; font-style: italic" />
    <Style Name="Heading3" Value="font-size: 13pt; font-weight: bold" />
  </StyleSheet>
  <Sections>
    <Section Type="PageHeader" Name="PageHeader1" Height="0" BackColor="16777215" />
    <Section Type="Detail" Name="Detail1" Height="3359.055" ColumnCount="2" ColumnDirection="1" BackColor="16777215" KeepTogether="1">
      <Control Type="AR.Image" Name="Picture1" Left="0" Top="0" Width="5948.789" Height="3359.055" LineWeight="0" SizeMode="1">[encoded data, 73524 characters]</Control>
      <Control Type="AR.Field" Name="Shitei_sbt2" Left="1417.323" Top="226.7717" Width="1133.858" Height="566.9291" Text="翌配ワイド" Style="background-color: Black; color: White; font-family: ＭＳ Ｐゴシック; font-size: 10pt; font-weight: normal; text-align: center; vertical-align: middle; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="receiver_zip_1" DataField="receiver_zip_1&#xD;&#xA;" Left="2944.629" Top="259.6536" Width="340.1575" Height="450.1418" Text="9" Style="font-size: 20pt; text-align: center; vertical-align: middle; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="receiver_zip_2" DataField="receiver_zip_2" Left="3288.189" Top="259.6535" Width="340.1575" Height="450.1418" Text="9" Style="font-size: 20pt; text-align: center; vertical-align: middle; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="receiver_zip_3" DataField="receiver_zip_3&#xD;&#xA;" Left="3628.346" Top="259.6535" Width="340.1575" Height="450.1418" Text="9" Style="font-size: 20pt; text-align: center; vertical-align: middle; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="receiver_zip_4" DataField="receiver_zip_4" Left="4138.583" Top="259.6535" Width="340.1575" Height="450.1418" Text="9" Style="font-size: 20pt; text-align: center; vertical-align: middle; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="receiver_zip_6" DataField="receiver_zip_6" Left="4818.898" Top="259.6535" Width="340.1575" Height="450.1418" Text="9" Style="font-size: 20pt; text-align: center; vertical-align: middle; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="receiver_zip_7" DataField="receiver_zip_7" Left="5159.055" Top="259.6535" Width="340.1575" Height="450.1418" Text="9" Style="font-size: 20pt; text-align: center; vertical-align: middle; ddo-char-set: 1" />
      <Control Type="AR.Barcode" Name="Barcode1" DataField="tracking_no_barcode" Left="306.1417" Top="2229.165" Width="2269.417" Height="740.9767" BarStyle="16" Text="Barcode1" CaptionPos="2" Checksum="0" Font="ＭＳ ゴシック" FontSize="8.25" CODE128="0;0;0" />
      <Control Type="AR.Field" Name="receiver_zip_5" DataField="receiver_zip_5" Left="4478.74" Top="259.6535" Width="340.1575" Height="450.1418" Text="9" Style="font-size: 20pt; text-align: center; vertical-align: middle; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="Shitei_sbt" Left="1417.323" Top="226.7716" Width="1133.858" Height="283.4646" Text="配達日指定" Style="background-color: Black; color: White; font-family: ＭＳ ゴシック; font-size: 9pt; font-weight: normal; text-align: center; vertical-align: middle; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="ShiteiYMD" DataField="delivery_appoint_ymd_mmdd_Kakko" Left="1417.323" Top="510.2362" Width="1133.858" Height="283.4646" Text="(１２／１２)" Style="background-color: Black; color: White; font-family: ＭＳ ゴシック; font-size: 9pt; font-weight: normal; text-align: center; vertical-align: middle; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="Shiharai_Kbn" Left="283.4646" Top="226.7717" Width="1133.858" Height="283.4646" Text="料金後納" Style="font-family: ＭＳ ゴシック; font-size: 9.75pt; font-weight: normal; text-align: center; vertical-align: middle; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="TextBox5" Left="283.4646" Top="510.2362" Width="1133.858" Height="283.4646" Text="ゆうパケット" Style="background-color: Black; color: White; font-family: ＭＳ ゴシック; font-size: 9pt; font-weight: normal; text-align: center; vertical-align: middle; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="shohin_nm001" DataField="shohin_nm001" Left="2097.638" Top="1559.055" Width="3571.654" Height="158.4" Text="品名１" Style="font-family: ＭＳ Ｐゴシック; font-size: 7pt; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="receiver_adr_2" DataField="receiver_adr_2" Left="1700.787" Top="952.4409" Width="3855.118" Height="158.1732" Text="お届け先の住所" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 7pt; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="receiver_nm_1" DataField="receiver_nm_1" Left="1700.787" Top="1258.583" Width="3685.039" Height="158.1732" Text="お届け先の名称" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 7pt; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="receiver_nm_2" DataField="receiver_nm_2" Left="1700.787" Top="1405.984" Width="3685.039" Height="158.1732" Text="お届け先の名称" Style="font-family: ＭＳ Ｐゴシック; font-size: 7pt; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="receiver_adr_1" DataField="receiver_adr_1" Left="1700.787" Top="788.0315" Width="3855.118" Height="158.1732" Text="お届け先の住所" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 7pt; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="todoke_keisho_kbn_nm" DataField="todoke_keisho_kbn_nm" Left="5385.827" Top="1405.984" Width="313.92" Height="158.4" Text="御中" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 6pt; white-space: nowrap; ddo-char-set: 128" />
      <Control Type="AR.Field" Name="receiver_adr_3" DataField="receiver_adr_3" Left="1700.787" Top="1105.512" Width="3855.118" Height="158.1732" Text="お届け先の住所" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 7pt; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="kokyaku_adr_1" DataField="kokyaku_adr_1" Left="2948.031" Top="2324.409" Width="2710.488" Height="170.0788" Text="ご依頼主の住所" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 5.012pt; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="kokyaku_zip_4" DataField="kokyaku_zip_4" Left="4648.819" Top="2154.331" Width="113.3858" Height="141.7323" Text="9" CanGrow="0" Style="font-family: Arial; font-size: 6pt; white-space: nowrap; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="Label1" Left="2934.912" Top="2154.331" Width="1078.866" Height="150.8035" Text="【差出人・返還先】" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 6.75pt; white-space: nowrap; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="kokyaku_zip_5" DataField="kokyaku_zip_5" Left="4762.205" Top="2154.331" Width="113.3858" Height="141.7323" Text="9" CanGrow="0" Style="font-family: Arial; font-size: 6pt; white-space: nowrap; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="kokyaku_zip_6" DataField="kokyaku_zip_6" Left="4875.591" Top="2154.331" Width="113.3858" Height="141.7323" Text="9" CanGrow="0" Style="font-family: Arial; font-size: 6pt; white-space: nowrap; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="kokyaku_zip_1" DataField="kokyaku_zip_1" Left="4195.276" Top="2154.331" Width="113.3858" Height="141.7323" Text="9" CanGrow="0" Style="font-family: Arial; font-size: 6pt; white-space: nowrap; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="kokyaku_zipLabel" Left="4049.577" Top="2154.331" Width="141.7323" Height="141.7323" Text="〒" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 6.75pt; text-align: center; vertical-align: top; white-space: nowrap; ddo-char-set: 128" />
      <Control Type="AR.Field" Name="kokyaku_adr_2" DataField="kokyaku_adr_2" Left="2948.031" Top="2466.142" Width="2710.488" Height="170.0788" Text="ご依頼主の住所" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 5.012pt; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="kokyaku_nm_2" DataField="kokyaku_nm_2" Left="2948.031" Top="2862.992" Width="2544.378" Height="167.2441" Text="ご依頼主の名称" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 5.012pt; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="goirai_keisho_kbn_nm" DataField="goirai_keisho_kbn_nm" Left="5499.213" Top="2862.992" Width="226.2047" Height="170.0788" Text="御中" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 4.5pt; vertical-align: top; white-space: nowrap; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="kokyaku_zip_7" DataField="kokyaku_zip_7" Left="4988.977" Top="2154.331" Width="113.3858" Height="141.7323" Text="9" CanGrow="0" Style="font-family: Arial; font-size: 6pt; white-space: nowrap; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="zip_Label" Left="4535.433" Top="2154.331" Width="113.3858" Height="141.7323" Text="-" CanGrow="0" Style="font-family: ＭＳ ゴシック; font-size: 7pt; text-align: center; white-space: nowrap; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="kokyaku_zip_2" DataField="kokyaku_zip_2" Left="4308.662" Top="2154.331" Width="113.3858" Height="141.7323" Text="9" CanGrow="0" Style="font-family: Arial; font-size: 6pt; white-space: nowrap; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="kokyaku_zip_3" DataField="kokyaku_zip_3" Left="4422.047" Top="2154.331" Width="113.3858" Height="141.7323" Text="9" CanGrow="0" Style="font-family: Arial; font-size: 6pt; white-space: nowrap; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="kokyaku_nm_1" DataField="kokyaku_nm_1" Left="2948.031" Top="2726.929" Width="2544.378" Height="170.0788" Text="ご依頼主の名称" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 5.012pt; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="kokyaku_adr_3" DataField="kokyaku_adr_3" Left="2948.031" Top="2596.535" Width="2710.488" Height="170.0788" Text="ご依頼主の住所" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 5.012pt; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="lbl_shohin_nm" Left="1700.787" Top="1559.055" Width="419.5964" Height="158.4" Text="品名/" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 7pt; white-space: nowrap; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="TextBox1" Left="3855.118" Top="226.7717" Width="344.9999" Height="453.5433" Text="-" Style="font-size: 20.25pt; text-align: center; vertical-align: middle" />
      <Control Type="AR.Field" Name="TextBox3" Left="2607.874" Top="255.1181" Width="344.9999" Height="510.2362" Text="〒" Style="font-size: 20.25pt; text-align: center; vertical-align: middle" />
      <Control Type="AR.Shape" Name="Shape1" Left="283.4646" Top="226.7716" Width="1133.858" Height="283.4646" BackColor="16777215" RoundingRadius="9.999999" />
      <Control Type="AR.Barcode" Name="customer_barcode" DataField="customer_barcode" Left="1644.095" Top="1840.819" Width="4031.944" Height="176.5815" BarStyle="26" Text="Barcode1" Font="Courier New" FontSize="8" CODE128="0;0;0" />
      <Control Type="AR.Barcode" Name="shiwake_no_barcode_2" DataField="shiwake_no_barcode" Tag="" Left="328.8189" Top="1360.63" Width="1060.157" Height="623.622" BarStyle="10" Text="123456" Font="ＭＳ Ｐゴシック" FontSize="6" CODE128="0;0;0" />
      <Control Type="AR.Field" Name="shiwake_no_fmt" DataField="shiwake_no_fmt" Left="283.4646" Top="765.3544" Width="1360.63" Height="396.8504" Text="仕分番号" CanGrow="0" Style="font-family: ＭＳ ゴシック; font-size: 15.75pt; text-align: center; vertical-align: middle; white-space: nowrap; ddo-char-set: 128" />
    </Section>
    <Section Type="PageFooter" Name="PageFooter1" Height="0" BackColor="16777215" />
  </Sections>
  <ReportComponentTray />
  <Script><![CDATA['---フォントサイズ切替境界 変数宣言---
'名称，住所（MAX:50Byte）
const FONT_SMALL as integer = 40 
const FONT_MID as integer = 25 

'2017/9/19 paku 課題番号1170 ゆうパケット・ゆうメールにカスタマーバーコードを印字する対応↓
'お届先住所フォント定義
'const TODOKEADR_LARGE as double = 10
'const TODOKEADR_MID as double = 9
'const TODOKEADR_SMALL as double = 7
	
'お届先名称フォント定義
'const TODOKENM_LARGE as double = 10
'const TODOKENM_MID as double = 9
'const TODOKENM_SMALL as double = 7
'2017/9/19 paku 課題番号1170 ゆうパケット・ゆうメールにカスタマーバーコードを印字する対応↑

'ご依頼主住所フォント定義
const NIOKURIADR_LARGE as double = 7
const NIOKURIADR_MID as double = 6.5
const NIOKURIADR_SMALL as double = 5

'ご依頼主名称フォント定義
const NIOKURINM_LARGE as double = 7
const NIOKURINM_MID as double = 6.5
const NIOKURINM_SMALL as double = 5

'2017/9/19 paku 課題番号1170 ゆうパケット・ゆうメールにカスタマーバーコードを印字する対応↓
'商品名フォント定義
'const SHOHIN_LARGE as double = 8
'const SHOHIN_MID as double = 7
'const SHOHIN_SMALL as double = 6
'2017/9/19 paku 課題番号1170 ゆうパケット・ゆうメールにカスタマーバーコードを印字する対応↑

'文字列カウント用変数
dim len as integer

'デフォルトのフォントサイズの定義を追加する
'2017/9/19 paku 課題番号1170 ゆうパケット・ゆうメールにカスタマーバーコードを印字する対応↓
''お届先住所のデフォルトサイズ定義
'Const TODOKEADR_DEF As Double = 6.012

''お届先名称デフォルトサイズ定義
'Const TODOKENM_DEF As Double = 6.012
'2017/9/19 paku 課題番号1170 ゆうパケット・ゆうメールにカスタマーバーコードを印字する対応↑

'ご依頼主住所デフォルトサイズ定義
const NIOKURIADR_DEF as double = 5.012

'ご依頼主名称デフォルトサイズ定義
const NIOKURINM_DEF as double = 5.012

'2017/9/19 paku 課題番号1170 ゆうパケット・ゆうメールにカスタマーバーコードを印字する対応↓
''商品名デフォルトサイズ定義
'const SHOHIN_DEF as double = 6.012
'2017/9/19 paku 課題番号1170 ゆうパケット・ゆうメールにカスタマーバーコードを印字する対応↑

'現在のRPXの設定サイズを格納する変数
'2017/9/19 paku 課題番号1170 ゆうパケット・ゆうメールにカスタマーバーコードを印字する対応↓
''お届先住所フォント定義
'Dim receiver_adr_1_Size As Double
'Dim receiver_adr_2_Size As Double
'Dim receiver_adr_3_Size As Double

''お届先名称フォント定義
'Dim receiver_nm_1_Size As Double
'Dim receiver_nm_2_Size As Double
'2017/9/19 paku 課題番号1170 ゆうパケット・ゆうメールにカスタマーバーコードを印字する対応↑

'ご依頼主住所フォント定義
dim kokyaku_adr_1_Size as double
dim kokyaku_adr_2_Size as double
dim kokyaku_adr_3_Size as double

'ご依頼主名称フォント定義
dim kokyaku_nm_1_Size as double
dim kokyaku_nm_2_Size as double

'2017/9/19 paku 課題番号1170 ゆうパケット・ゆうメールにカスタマーバーコードを印字する対応↓
''商品名フォント定義
'dim shohin_nm001_Size as double
'2017/9/19 paku 課題番号1170 ゆうパケット・ゆうメールにカスタマーバーコードを印字する対応↑

'スクリプトで設定するフォントサイズを格納するための変数
Dim Font_Size As Double


'スタート時に現在のRPXの設定サイズを取得する
Sub ActiveReport_ReportStart()

	'2017/9/19 paku 課題番号1170 ゆうパケット・ゆうメールにカスタマーバーコードを印字する対応↓
	''お届先住所フォント定義
	'Try
		'receiver_adr_1_Size = CType(Me.Detail1.Controls("receiver_adr_1"), DataDynamics.ActiveReports.TextBox).Font.'Size
	'Catch ex As exception
	'End Try
	'Try
		'receiver_adr_2_Size = CType(Me.Detail1.Controls("receiver_adr_2"), DataDynamics.ActiveReports.TextBox).Font.'Size
	'Catch ex As exception
	'End Try
	'Try
		'receiver_adr_3_Size = CType(Me.Detail1.Controls("receiver_adr_3"), DataDynamics.ActiveReports.TextBox).Font.Size
	'Catch ex As exception
	'End Try

	''お届先名称フォント定義
	'Try
		'receiver_nm_1_Size = CType(Me.Detail1.Controls("receiver_nm_1"), DataDynamics.ActiveReports.TextBox).Font.Size
	'Catch ex As exception
	'End Try
	'Try
		'receiver_nm_2_Size = CType(Me.Detail1.Controls("receiver_nm_2"), DataDynamics.ActiveReports.TextBox).Font.Size
	'Catch ex As exception
	'End Try
    '2017/9/19 paku 課題番号1170 ゆうパケット・ゆうメールにカスタマーバーコードを印字する対応↑
	'ご依頼主住所フォント定義
	try
		kokyaku_adr_1_Size = ctype(me.Detail1.Controls("kokyaku_adr_1"), DataDynamics.ActiveReports.TextBox).Font.Size
	Catch ex as exception
	End Try
	try
		kokyaku_adr_2_Size = ctype(me.Detail1.Controls("kokyaku_adr_2"), DataDynamics.ActiveReports.TextBox).Font.Size
	Catch ex as exception
	End Try
	try
		kokyaku_adr_3_Size = ctype(me.Detail1.Controls("kokyaku_adr_3"), DataDynamics.ActiveReports.TextBox).Font.Size
	Catch ex as exception
	End Try

	'ご依頼主名称フォント定義
	try
		kokyaku_nm_1_Size = ctype(me.Detail1.Controls("kokyaku_nm_1"), DataDynamics.ActiveReports.TextBox).Font.Size
	Catch ex as exception
	End Try
	try
		kokyaku_nm_2_Size = ctype(me.Detail1.Controls("kokyaku_nm_2"), DataDynamics.ActiveReports.TextBox).Font.Size
	Catch ex as exception
	End Try
	
	'2017/9/19 paku 課題番号1170 ゆうパケット・ゆうメールにカスタマーバーコードを印字する対応↓
	''商品名フォント定義
	'try
		'shohin_nm001_Size = ctype(me.Detail1.Controls("shohin_nm001"), DataDynamics.ActiveReports.TextBox).Font.Size
	'Catch ex as exception
	'End Try
	'2017/9/19 paku 課題番号1170 ゆうパケット・ゆうメールにカスタマーバーコードを印字する対応↑
	
End Sub

Sub Detail1_Format()
	
	'支払方法
	If rpt.Fields("shiharai_houhou_kbn").Value.tostring.trim = "2" Then
		try
			ctype(me.Detail1.Controls("Shiharai_Kbn"), DataDynamics.ActiveReports.TextBox).Text = "料金後納"
		Catch ex as exception
		End Try
	Elseif rpt.Fields("shiharai_houhou_kbn").Value.tostring.trim = "1" Then
		try
			ctype(me.Detail1.Controls("Shiharai_Kbn"), DataDynamics.ActiveReports.TextBox).Text = "料金別納"
		Catch ex as exception
		End Try
	Else
		try
			ctype(me.Detail1.Controls("Shiharai_Kbn"), DataDynamics.ActiveReports.TextBox).Text = ""
		Catch ex as exception
		End Try
	End If

	'付加サービス（初期化）
	'可視
	Try
		ctype(me.Detail1.Controls("Shitei_sbt"), DataDynamics.ActiveReports.TextBox).visible = false
	Catch ex as exception
	End Try
	Try
		ctype(me.Detail1.Controls("Shitei_sbt2"), DataDynamics.ActiveReports.TextBox).visible = false
	Catch ex as exception
	End Try
	Try
		ctype(me.Detail1.Controls("ShiteiYMD"), DataDynamics.ActiveReports.TextBox).visible = false
	Catch ex as exception
	End Try

	'カラー
	try
		ctype(me.Detail1.Controls("Shitei_sbt"), DataDynamics.ActiveReports.TextBox).BackColor = System.Drawing.Color.Transparent
	Catch ex as exception
	End Try
	Try
		ctype(me.Detail1.Controls("Shitei_sbt2"), DataDynamics.ActiveReports.TextBox).BackColor = System.Drawing.Color.Transparent
	Catch ex as exception
	End Try
	try
		ctype(me.Detail1.Controls("ShiteiYMD"), DataDynamics.ActiveReports.TextBox).BackColor = System.Drawing.Color.Transparent
	Catch ex as exception
	End Try
	
	'テキスト
	try
		ctype(me.Detail1.Controls("Shitei_sbt"), DataDynamics.ActiveReports.TextBox).Text = ""
	Catch ex as exception
	End Try
	try
		ctype(me.Detail1.Controls("Shitei_sbt2"), DataDynamics.ActiveReports.TextBox).Text = ""
	Catch ex as exception
	End Try
	
	
	'付加サービス（変更）
	If rpt.Fields("haitatsushitei_sbt").Value.tostring = "6" Then
		Try
			ctype(me.Detail1.Controls("Shitei_sbt"), DataDynamics.ActiveReports.TextBox).visible = true
		Catch ex as exception
		End Try
		Try
			ctype(me.Detail1.Controls("ShiteiYMD"), DataDynamics.ActiveReports.TextBox).visible = true
		Catch ex as exception
		End Try
		Try
			ctype(me.Detail1.Controls("Shitei_sbt"), DataDynamics.ActiveReports.TextBox).BackColor = System.Drawing.Color.Black
		Catch ex as exception
		End Try
		try
			ctype(me.Detail1.Controls("ShiteiYMD"), DataDynamics.ActiveReports.TextBox).BackColor = System.Drawing.Color.Black
		Catch ex as exception
		End Try
		try
			ctype(me.Detail1.Controls("Shitei_sbt"), DataDynamics.ActiveReports.TextBox).Text = "配達日指定"
		Catch ex as exception
		End Try
	Elseif rpt.Fields("haitatsushitei_sbt").Value.tostring = "7" Then
		Try
			ctype(me.Detail1.Controls("Shitei_sbt2"), DataDynamics.ActiveReports.TextBox).visible = true
		Catch ex as exception
		End Try
		try
			ctype(me.Detail1.Controls("Shitei_sbt2"), DataDynamics.ActiveReports.TextBox).Text = "翌配ワイド"
		Catch ex as exception
		End Try
		try
			ctype(me.Detail1.Controls("Shitei_sbt2"), DataDynamics.ActiveReports.TextBox).BackColor = System.Drawing.Color.Black
		Catch ex as exception
		End Try
	Elseif rpt.Fields("haitatsushitei_sbt").Value.tostring = "8" Then
		Try
			ctype(me.Detail1.Controls("Shitei_sbt2"), DataDynamics.ActiveReports.TextBox).visible = true
		Catch ex as exception
		End Try
		try
			ctype(me.Detail1.Controls("Shitei_sbt2"), DataDynamics.ActiveReports.TextBox).Text = "当日配達"
		Catch ex as exception
		End Try
		try
			ctype(me.Detail1.Controls("Shitei_sbt2"), DataDynamics.ActiveReports.TextBox).BackColor = System.Drawing.Color.Black
		Catch ex as exception
		End Try
	End If

	'郵便局留対応
	if rpt.Fields("todoke_kyokudome_kbn").Value.tostring() = "1" then
		try
			ctype(me.Detail1.Controls("kyokudome_Label"), DataDynamics.ActiveReports.TextBox).Visible = True
		Catch ex as exception
		End Try
	else
		try
			ctype(me.Detail1.Controls("kyokudome_Label"), DataDynamics.ActiveReports.TextBox).Visible = False
		Catch ex as exception
		End Try
	End If
	
	'////フォント制御
	'2017/9/19 paku 課題番号1170 ゆうパケット・ゆうメールにカスタマーバーコードを印字する対応↓
	''お届け先住所
	'len = 0
	'len = getByteCount("receiver_adr_1")

	'If len < getByteCount("receiver_adr_2") Then
		'len = getByteCount("receiver_adr_2")
	'End If

	'If len < getByteCount("receiver_adr_3") Then
		'len = getByteCount("receiver_adr_3")
	'End If

	'If len >= FONT_SMALL Then
		'Font_Size = TODOKEADR_SMALL
	'ElseIf len >= FONT_MID And len < FONT_SMALL Then
		'Font_Size = TODOKEADR_MID
	'Else
		'Font_Size = TODOKEADR_LARGE
	'End If
	'FontSize_Set("receiver_adr_1", receiver_adr_1_Size, TODOKEADR_DEF, Font_Size)
	'FontSize_Set("receiver_adr_2", receiver_adr_2_Size, TODOKEADR_DEF, Font_Size)
	'FontSize_Set("receiver_adr_3", receiver_adr_3_Size, TODOKEADR_DEF, Font_Size)

	''お届け先名称
	'len = 0
	'len = getByteCount("receiver_nm_1")

	'If len < getByteCount("receiver_nm_2") Then
		'len = getByteCount("receiver_nm_2")
	'End If

	'If len >= FONT_SMALL Then
		'Font_Size = TODOKENM_SMALL
	'ElseIf len >= FONT_MID And len < FONT_SMALL Then
		'Font_Size = TODOKENM_MID
	'Else
		'Font_Size = TODOKENM_LARGE
	'End If
	'FontSize_Set("receiver_nm_1", receiver_nm_1_Size, TODOKENM_DEF, Font_Size)
	'FontSize_Set("receiver_nm_2", receiver_nm_2_Size, TODOKENM_DEF, Font_Size)
    '2017/9/19 paku 課題番号1170 ゆうパケット・ゆうメールにカスタマーバーコードを印字する対応↑
	
	'ご依頼主住所
	len = 0
	len = getByteCount("kokyaku_adr_1")

	if len < getByteCount("kokyaku_adr_2") then
		len = getByteCount("kokyaku_adr_2")
	End If

	if len < getByteCount("kokyaku_adr_3") then
		len = getByteCount("kokyaku_adr_3")
	End If

	if len >= FONT_SMALL then
		Font_Size = NIOKURIADR_SMALL
	else if len >= FONT_MID and len < FONT_SMALL then
		Font_Size = NIOKURIADR_MID
	else
		Font_Size = NIOKURIADR_LARGE
	End If
	FontSize_Set("kokyaku_adr_1", kokyaku_adr_1_Size, NIOKURIADR_DEF, Font_Size)
	FontSize_Set("kokyaku_adr_2", kokyaku_adr_2_Size, NIOKURIADR_DEF, Font_Size)
	FontSize_Set("kokyaku_adr_3", kokyaku_adr_3_Size, NIOKURIADR_DEF, Font_Size)
	
	'ご依頼主名称
	len = 0
	len = getByteCount("kokyaku_nm_1")

	if len < getByteCount("kokyaku_nm_2") then
		len = getByteCount("kokyaku_nm_2")
	End If

	if len >= FONT_SMALL then
		Font_Size = NIOKURINM_SMALL
	else if len >= FONT_MID and len < FONT_SMALL then
		Font_Size = NIOKURINM_MID
	else
		Font_Size = NIOKURINM_LARGE
	End If
	FontSize_Set("kokyaku_nm_1", kokyaku_nm_1_Size, NIOKURINM_DEF, Font_Size)
	FontSize_Set("kokyaku_nm_2", kokyaku_nm_2_Size, NIOKURINM_DEF, Font_Size)	

	'2017/9/19 paku 課題番号1170 ゆうパケット・ゆうメールにカスタマーバーコードを印字する対応↓
	''商品名
	len = 0
	len = getByteCount("shohin_nm001")

	'if len >= FONT_SMALL then
		'Font_Size = SHOHIN_SMALL
	'else if len >= FONT_MID and len < FONT_SMALL then
		'Font_Size = SHOHIN_MID
	'else
		'Font_Size = SHOHIN_LARGE
	'End If
	'FontSize_Set("lbl_shohin_nm", shohin_nm001_Size, SHOHIN_DEF, Font_Size)
	'FontSize_Set("shohin_nm001", shohin_nm001_Size, SHOHIN_DEF, Font_Size)
	'2017/9/19 paku 課題番号1170 ゆうパケット・ゆうメールにカスタマーバーコードを印字する対応↑
	
	'見出しの表示
	if len = 0 Then
		try
			ctype(me.Detail1.Controls("lbl_shohin_nm"), DataDynamics.ActiveReports.TextBox).Visible = false
		Catch ex as exception
		End Try
	else
		try
			ctype(me.Detail1.Controls("lbl_shohin_nm"), DataDynamics.ActiveReports.TextBox).Visible = true
		Catch ex as exception
		End Try
	End If
	
End Sub

'引数をオブジェクトネームにして項目が存在しなくても処理続行できるように元のファンクションを再作成
Private Function getByteCount(ByVal ObjectNM As String) As Integer

	'サロゲート文字で文字数判定ＯＫ
	Dim dt As System.Globalization.StringInfo
	Dim num As Integer
	Dim dispnum As Integer
	Dim str As String

	Try
		str = CType(Me.Detail1.Controls(ObjectNM), DataDynamics.ActiveReports.TextBox).text.Trim()

		dt = New System.Globalization.StringInfo(str)
		num = dt.LengthInTextElements

		Dim by As Byte()

		Dim hatena As String
		Dim hatena_sjis As Byte()

		's-jisに変換すると、変換出来ない場合があり、?になる
		hatena = "?"
		hatena_sjis = System.Text.Encoding.GetEncoding(932).GetBytes(hatena)

		dispnum = 0

		'一文字ずつ取り出す
		For i As Integer = 0 To num - 1

			by = System.Text.Encoding.GetEncoding(932).GetBytes(dt.SubstringByTextElements(i, 1))

			If (Char.IsSurrogate(dt.SubstringByTextElements(i, 1))) Then
				dispnum += 2
			Else
				If (dt.SubstringByTextElements(i, 1) <> hatena And hatena_sjis(0) = by(0)) Then
					'?はこっちを通る
					dispnum += 2
				Else
					dispnum += by.GetLength(0)
				End If
			End If

		Next

	Catch ex As exception
		dispnum = 0
	End Try

	Return dispnum

End Function

'フォントサイズをセットする
Private Sub FontSize_Set(ByVal ObjectNM As String, ByVal RPXSize As Double, ByVal DefSize As Double, ByVal ScrSize As Double)

	Try
		'指定した小数桁までで比較する
		Dim RPXSize_Kirisute As Double = ShosuKirisute(RPXSize)
		Dim DefSize_Kirisute As Double = ShosuKirisute(DefSize)

		'Doubleのままだと下のIF文が正常に動作しないのでStringで比較する
		Dim RPXSize_Str As String = CType(RPXSize_Kirisute, String)
		Dim DefSize_Str As String = CType(DefSize_Kirisute, String)

		'デザイナで設定されたサイズとデフォルトサイズが一致の場合はスクリプトで変更する
		'デザイナで設定されたサイズとデフォルトサイズが不一致の場合はデザイナで設定されたサイズのままとする
		If RPXSize_Str = DefSize_Str Then
			Dim Text_Buf As DataDynamics.ActiveReports.TextBox
			Text_Buf = CType(Me.Detail1.Controls(ObjectNM), DataDynamics.ActiveReports.TextBox)
			Text_Buf.Font = New System.Drawing.Font(Text_Buf.Font.FontFamily, ScrSize)
		End If
	Catch ex As exception
	End Try

End Sub

'引数の小数第４位以降を切り捨てて返却する
'引数が負の値の場合は考慮しない
'例）引数：12.3456　／　返却値：12.345
Private Function ShosuKirisute(ByVal Value As Double) As Double

	Dim ReValue As Double

	'残す小数の位数を指定する
	Dim Keta As Integer = 3

	Try
		'① 指定された位数分だけ10の累乗する
		Dim KetaJou As Double = System.Math.Pow(10, Keta)

		'② ①と引数の積から小数部分を切り捨て、小数点の位置を元に戻す
		ReValue = System.Math.Floor(Value * KetaJou) / KetaJou

	Catch ex As Exception
		ReValue = Value
	End Try

	Return ReValue

End Function
]]></Script>
  <PageSettings LeftMargin="0" RightMargin="0" TopMargin="0" BottomMargin="0" PaperSize="9" PaperWidth="11906" PaperHeight="16838" PaperName="" Orientation="1" />
  <Parameters />
</ActiveReportsLayout>