<?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.Shape" Name="Shape3" Left="340.1575" Top="226.7717" Width="1133.858" Height="283.4646" BackStyle="1" RoundingRadius="9.999999" />
      <Control Type="AR.Field" Name="receiver_zip_1" DataField="receiver_zip_1&#xD;&#xA;" Left="3003.59" Top="289.1339" Width="340.1575" Height="510.2362" Text="9" Style="font-size: 20pt; text-align: center; vertical-align: middle" />
      <Control Type="AR.Field" Name="receiver_zip_2" DataField="receiver_zip_2" Left="3344.882" Top="289.1339" Width="340.1575" Height="510.2362" Text="9" Style="font-size: 20pt; text-align: center; vertical-align: middle" />
      <Control Type="AR.Field" Name="receiver_zip_3" DataField="receiver_zip_3&#xD;&#xA;" Left="3685.039" Top="289.1339" Width="340.1575" Height="510.2362" Text="9" Style="font-size: 20pt; text-align: center; vertical-align: middle" />
      <Control Type="AR.Field" Name="receiver_zip_4" DataField="receiver_zip_4" Left="4195.276" Top="289.1339" Width="340.1575" Height="510.2362" Text="9" Style="font-size: 20pt; text-align: center; vertical-align: middle" />
      <Control Type="AR.Field" Name="receiver_zip_6" DataField="receiver_zip_6" Left="4875.591" Top="289.1339" Width="340.1575" Height="510.2362" Text="9" Style="font-size: 20pt; text-align: center; vertical-align: middle" />
      <Control Type="AR.Field" Name="receiver_zip_7" DataField="receiver_zip_7" Left="5215.748" Top="289.1339" Width="340.1575" Height="510.2362" Text="9" Style="font-size: 20pt; text-align: center; vertical-align: middle" />
      <Control Type="AR.Field" Name="receiver_adr_1" DataField="receiver_adr_1" Left="1725.165" Top="820.3464" Width="3929.953" Height="198.4252" Text="お届け先の住所" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 6.012pt; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="Label1" Left="2900.978" Top="2239.37" Width="1231.37" Height="150.8035" Text="【差出人・返還先】" CanGrow="0" Style="font-family: ＭＳ ゴシック; font-size: 7pt; white-space: nowrap; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="kokyaku_zipLabel" Left="4177.702" Top="2239.37" Width="141.7323" Height="150.8032" 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_adr_1" DataField="kokyaku_adr_1" Left="2891.339" Top="2381.102" Width="2710.488" Height="130.3937" Text="ご依頼主の住所" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 5.012pt; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="Label2" Left="340.1575" Top="238.1102" Width="1133.858" Height="283.4646" Text="料金別納" Style="font-family: ＭＳ ゴシック; font-size: 9.75pt; font-weight: bold; text-align: center; vertical-align: middle; ddo-char-set: 0" />
      <Control Type="AR.Field" Name="receiver_adr_2" DataField="receiver_adr_2" Left="1725.165" Top="1018.772" Width="3929.952" Height="198.4252" Text="お届け先の住所" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 6.012pt; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="receiver_adr_3" DataField="receiver_adr_3" Left="1725.165" Top="1217.197" Width="3929.953" Height="198.4253" Text="お届け先の住所" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 6.012pt; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="receiver_nm_2" DataField="receiver_nm_2" Left="1726.299" Top="1614.047" Width="3540.472" Height="198.4252" Text="お届け先の名称" Style="font-family: ＭＳ Ｐゴシック; font-size: 6.012pt; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="kokyaku_adr_2" DataField="kokyaku_adr_2" Left="2891.339" Top="2511.496" Width="2710.488" Height="130.3936" Text="ご依頼主の住所" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 5.012pt; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="todoke_keisho_kbn_nm" DataField="todoke_keisho_kbn_nm" Left="5265.639" Top="1360.064" Width="374.7402" Height="305.0078" Text="様" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 8pt; white-space: nowrap; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="goirai_keisho_kbn_nm" DataField="goirai_keisho_kbn_nm" Left="5442.52" Top="2717.858" Width="298.7711" Height="252.2835" Text="様" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 6pt; vertical-align: top; white-space: nowrap; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="kokyaku_zip_2" DataField="kokyaku_zip_2" Left="4453.795" Top="2239.37" Width="130.3937" Height="150.8032" Text="9" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 6pt; white-space: nowrap; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="kokyaku_zip_3" DataField="kokyaku_zip_3" Left="4592.126" Top="2239.37" Width="141.7323" Height="150.8032" Text="9" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 6pt; white-space: nowrap; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="zip_Label" Left="4715.718" Top="2239.37" Width="141.7323" Height="150.8032" 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_5" DataField="kokyaku_zip_5" Left="4997.481" Top="2239.37" Width="141.7323" Height="150.8032" Text="9" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 6pt; white-space: nowrap; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="kokyaku_zip_1" DataField="kokyaku_zip_1" Left="4323.403" Top="2239.37" Width="130.3937" Height="150.8032" Text="9" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 6pt; white-space: nowrap; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="kokyaku_zip_4" DataField="kokyaku_zip_4" Left="4857.452" Top="2239.37" Width="141.7323" Height="150.8032" Text="9" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 6pt; white-space: nowrap; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="kokyaku_zip_6" DataField="kokyaku_zip_6" Left="5124.474" Top="2239.37" Width="141.7323" Height="150.8032" Text="9" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 6pt; white-space: nowrap; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="receiver_zip_5" DataField="receiver_zip_5" Left="4535.433" Top="289.1339" Width="340.1575" Height="510.2362" Text="9" Style="font-size: 20pt; text-align: center; vertical-align: middle" />
      <Control Type="AR.Field" Name="kokyaku_zip_7" DataField="kokyaku_zip_7" Left="5266.205" Top="2239.37" Width="141.7322" Height="150.8031" Text="9" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 6pt; white-space: nowrap; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="kokyaku_adr_3" DataField="kokyaku_adr_3" Left="2891.339" Top="2636.221" Width="2710.488" Height="130.3936" Text="ご依頼主の住所" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 5.012pt; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="kokyaku_nm_1" DataField="kokyaku_nm_1" Left="2891.339" Top="2760.945" Width="2544.378" Height="130.3937" 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="2891.339" Top="2880" Width="2544.378" Height="130.3937" Text="ご依頼主の名称" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 5.012pt; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="receiver_nm_1" DataField="receiver_nm_1" Left="1725.165" Top="1415.622" Width="3540.472" Height="198.4252" Text="お届け先の名称" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 6.012pt; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="Label4" Left="340.1575" Top="238.1102" Width="1133.858" Height="283.4646" Text="料金後納" Style="font-family: ＭＳ ゴシック; font-size: 9.75pt; font-weight: bold; text-align: center; vertical-align: middle; ddo-char-set: 0" />
      <Control Type="AR.Field" Name="kyokudome_Label" Left="1530.709" Top="521.5748" Width="1133.858" Height="283.4646" Text="郵便局留" CanGrow="0" Style="background-color: Black; color: White; font-family: ＭＳ Ｐゴシック; font-size: 8pt; font-weight: bold; text-align: center; vertical-align: middle; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="free01" DataField="free01" Left="340.157" Top="2238.804" Width="2269.417" Height="740.9764" Text="フリー項目１" CanGrow="0" Style="font-family: ＭＳ Ｐゴシック; font-size: 9.012pt; vertical-align: top; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Barcode" Name="Barcode1" DataField="tracking_no_barcode" Left="340.157" Top="2238.804" Width="2269.417" Height="740.9767" BarStyle="16" Text="Barcode1" CaptionPos="2" Checksum="0" Font="ＭＳ Ｐゴシック" FontSize="5" CODE128="0;0;0" />
      <Control Type="AR.Field" Name="kakitome_nm" DataField="kakitome_security_sbt_nm" Left="1530.709" Top="238.1102" Width="1133.858" Height="283.4646" Text="書留種別" CanGrow="0" Style="background-color: Black; color: White; font-family: ＭＳ Ｐゴシック; font-size: 8pt; font-weight: bold; text-align: center; vertical-align: middle; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="Label5" Left="340.1575" Top="521.5748" Width="1133.858" Height="283.4646" Text="ゆうメール&#xD;&#xA;" CanGrow="0" Style="color: Black; font-family: ＭＳ ゴシック; font-size: 8pt; font-weight: bold; text-align: center; vertical-align: middle; ddo-char-set: 1" />
      <Control Type="AR.Shape" Name="Shape5" Left="340.1575" Top="504.567" Width="1133.858" Height="283.4646" BackColor="16777215" RoundingRadius="9.999999" />
      <Control Type="AR.Barcode" Name="customer_barcode" DataField="customer_barcode" Left="1700.787" Top="1929.26" Width="4031.944" Height="176.5815" BarStyle="26" Text="Barcode1" Font="Courier New" FontSize="8" CODE128="0;0;0" />
      <Control Type="AR.Field" Name="TextBox1" Left="3911.811" Top="226.7717" Width="344.9999" Height="566.9291" Text="-" Style="font-size: 20.25pt; text-align: center; vertical-align: middle" />
      <Control Type="AR.Field" Name="TextBox3" Left="2721.26" Top="283.4646" Width="344.9999" Height="510.2362" Text="〒" Style="font-size: 20.25pt; text-align: center; vertical-align: middle" />
      <Control Type="AR.Barcode" Name="shiwake_no_barcode_2" DataField="shiwake_no_barcode" Tag="" Left="343.5591" Top="1360.63" Width="1060.157" Height="623.6221" BarStyle="10" Text="123456" Font="ＭＳ Ｐゴシック" FontSize="6" CODE128="0;0;0" />
      <Control Type="AR.Field" Name="shiwake_no_fmt" DataField="shiwake_no_fmt" Left="340.1575" Top="822.0473" Width="1360.63" Height="340.1573" Text="仕分番号" CanGrow="0" Style="font-family: ＭＳ ゴシック; font-size: 15.75pt; text-align: center; vertical-align: middle; white-space: nowrap; ddo-char-set: 1" />
    </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 

'お届先住所フォント定義
const TODOKEADR_LARGE as integer = 9
const TODOKEADR_MID as integer = 8
const TODOKEADR_SMALL as integer = 7
	
'お届先名称フォント定義
const TODOKENM_LARGE as integer = 9
const TODOKENM_MID as integer = 8
const TODOKENM_SMALL as integer = 7

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

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

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

''2013.09.02 K.Takasaki@fuso 課題No199 フォント統一制御,レイアウトカスタマイズ対応,郵便局留め対応 ↓↓
''デフォルトのフォントサイズ
'お届先住所のデフォルトサイズ定義
const TODOKEADR_DEF as double = 6.012

'お届先名称デフォルトサイズ定義
const TODOKENM_DEF as double = 6.012

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

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

''現在のRPXの設定サイズを格納する変数
'お届先住所フォント定義
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

'ご依頼主住所フォント定義
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

'フォントサイズ
dim Font_Size as double

Sub ActiveReport_ReportStart
	
	'スタート時に現在のRPXの設定サイズを取得する
	'お届先住所フォント定義
	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

	'ご依頼主住所フォント定義
	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
End Sub

Sub Detail1_Format
		
	'初期化
	'2016/12/1 tsunoda 課題番号986 ゆうメールの簡易書留印字対応↓
	'try
	'	ctype(me.Detail1.Controls("Label3"), DataDynamics.ActiveReports.TextBox).Visible = False	'「ゆうメール追跡」文言
	'Catch ex as exception
	'End Try
	'try
	'	ctype(me.Detail1.Controls("Label5"), DataDynamics.ActiveReports.TextBox).Visible = False	'「ゆうメール」文言
	'Catch ex as exception
	'End Try
	'2016/12/1 tsunoda 課題番号986 ゆうメールの簡易書留印字対応↑
	try
		ctype(me.Detail1.Controls("Label2"), DataDynamics.ActiveReports.TextBox).Visible = False	'「料金別納」文言
	Catch ex as exception
	End Try
	try
		ctype(me.Detail1.Controls("Label4"), DataDynamics.ActiveReports.TextBox).Visible = False	'「料金後納」文言
	Catch ex as exception
	End Try
	'2016/12/1 tsunoda 課題番号986 ゆうメールの簡易書留印字対応↓
	'try
	'	ctype(me.Detail1.Controls("Shape2"), DataDynamics.ActiveReports.Shape).Visible = False	'「背景色：黒」
	'Catch ex as exception
	'End Try
	'try
	'	ctype(me.Detail1.Controls("Shape4"), DataDynamics.ActiveReports.Shape).Visible = False	'「背景色：白」
	'Catch ex as exception
	'End Try
	'2016/12/1 tsunoda 課題番号986 ゆうメールの簡易書留印字対応↑
	try
		ctype(me.Detail1.Controls("kyokudome_Label"), DataDynamics.ActiveReports.TextBox).Visible = False	'郵便局留ラベル
	Catch ex as exception
	End Try
	'2016/12/1 tsunoda 課題番号986 ゆうメールの簡易書留印字対応↓
	try
		CType(Me.Detail1.Controls("kakitome_nm"), DataDynamics.ActiveReports.TextBox).Visible = False       '書留/セキュリティ種別
	Catch ex As exception
	End Try
	'try
	'	ctype(me.Detail1.Controls("Shape5"), DataDynamics.ActiveReports.Shape).Visible = False       'ゆうメールの枠
	'Catch ex as exception
	'End Try
	'2016/12/1 tsunoda 課題番号986 ゆうメールの簡易書留印字対応↑
	
	'2016/4/5 paku 課題No768フリーエリア印字可能なユ00582の新規作成↓
	try
		ctype(me.Detail1.Controls("Barcode1"), DataDynamics.ActiveReports.Barcode).Visible = False	'「バーコード」文言
	Catch ex as exception
	End Try
	try
		ctype(me.Detail1.Controls("free01"), DataDynamics.ActiveReports.TextBox).Visible = False	'「フリー項目」文言
	Catch ex as exception
	End Try
	'2016/4/5 paku 課題No768フリーエリア印字可能なユ00582の新規作成↑
	
	'郵便局留対応
	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
	
	'2016/12/1 tsunoda 課題番号986 ゆうメールの簡易書留印字対応↓
	'書留／セキュリティの印字制御
	If rpt.Fields("kakitome_security_sbt").Value.tostring() = "0" Then
		'一般の場合は印字しない
		Try
			CType(Me.Detail1.Controls("kakitome_nm"), DataDynamics.ActiveReports.TextBox).Visible = False
		Catch ex As exception
		End Try
	ElseIf rpt.Fields("kakitome_security_sbt").Value.tostring() = "2" Then
		'書留/セキュリティは文言を変更する
		Try
			CType(Me.Detail1.Controls("kakitome_nm"), DataDynamics.ActiveReports.TextBox).Text = "書留"
		Catch ex As exception
		End Try
		Try
			CType(Me.Detail1.Controls("kakitome_nm"), DataDynamics.ActiveReports.TextBox).Visible = True
		Catch ex As exception
		End Try
	Else
		'簡易書留，特定記録の場合は印字する
		Try
			CType(Me.Detail1.Controls("kakitome_nm"), DataDynamics.ActiveReports.TextBox).Visible = True
		Catch ex As exception
		End Try
	End If
	'2016/12/1 tsunoda 課題番号986 ゆうメールの簡易書留印字対応↑

	'「ゆうメール」文言，背景色の制御
	if rpt.Fields("tracking_no_barcode").Value.tostring.length = 0 Then
		'2016/4/5 paku 課題No768フリーエリア印字可能なユ00582の新規作成↓
		''追跡番号付きの場合、「ゆうメール」を表示。背景色：白，文言色：黒
		'追跡番号なしの場合、「ゆうメール」を表示。背景色：白，文言色：黒，バーコード非表示、フリー項目表示
		'2016/4/5 paku 課題No768フリーエリア印字可能なユ00582の新規作成↑
		'2016/12/1 tsunoda 課題番号986 ゆうメールの簡易書留印字対応↓
		'try
		'	ctype(me.Detail1.Controls("Label3"), DataDynamics.ActiveReports.TextBox).Visible = False
		'Catch ex as exception
		'End Try
		'try
		'	ctype(me.Detail1.Controls("Label5"), DataDynamics.ActiveReports.TextBox).Visible = True
		'Catch ex as exception
		'End Try
		''2016/12/1 tsunoda 課題番号986 ゆうメールの簡易書留印字対応↓
		'try
		'	ctype(me.Detail1.Controls("Shape5"), DataDynamics.ActiveReports.Shape).Visible = True
		'Catch ex as exception
		'End Try
		''2016/12/1 tsunoda 課題番号986 ゆうメールの簡易書留印字対応↑
		'try
		'	ctype(me.Detail1.Controls("Shape2"), DataDynamics.ActiveReports.Shape).Visible = False
		'Catch ex as exception
		'End Try
		'try
		'	ctype(me.Detail1.Controls("Shape4"), DataDynamics.ActiveReports.Shape).Visible = True
		'Catch ex as exception
		'End Try
		'2016/12/1 tsunoda 課題番号986 ゆうメールの簡易書留印字対応↑
		'2016/4/5 paku 課題No768フリーエリア印字可能なユ00582の新規作成↓
		'バーコード
		try
		    ctype(me.Detail1.Controls("Barcode1"), DataDynamics.ActiveReports.Barcode).Visible = False
		Catch ex as exception
		End Try
		'フリー項目
		try
			ctype(me.Detail1.Controls("free01"), DataDynamics.ActiveReports.TextBox).Visible = True
		Catch ex as exception
		End Try
		'2016/4/5 paku 課題No768フリーエリア印字可能なユ00582の新規作成↑
	else
		'2016/4/5 paku 課題No768フリーエリア印字可能なユ00582の新規作成↓
		''追跡番号付きの場合、「ゆうメール追跡」を表示。背景色：黒，文言色：白
		'追跡番号付きの場合、「ゆうメール追跡」を表示。背景色：黒，文言色：白，バーコード表示、フリー項目非表示
		'2016/4/5 paku 課題No768フリーエリア印字可能なユ00582の新規作成↓
		'2016/12/1 tsunoda 課題番号986 ゆうメールの簡易書留印字対応↓
		'try
		'	ctype(me.Detail1.Controls("Label3"), DataDynamics.ActiveReports.TextBox).Visible = True
		'Catch ex as exception
		'End Try
		'try
		'	ctype(me.Detail1.Controls("Label5"), DataDynamics.ActiveReports.TextBox).Visible = False
		'Catch ex as exception
		'End Try
		''2016/12/1 tsunoda 課題番号986 ゆうメールの簡易書留印字対応↓
		'try
		'	ctype(me.Detail1.Controls("Shape5"), DataDynamics.ActiveReports.Shape).Visible = False
		'Catch ex as exception
		'End Try
		''2016/12/1 tsunoda 課題番号986 ゆうメールの簡易書留印字対応↑
		'try
		'	ctype(me.Detail1.Controls("Shape2"), DataDynamics.ActiveReports.Shape).Visible = True
		'Catch ex as exception
		'End Try
		'try
		'	ctype(me.Detail1.Controls("Shape4"), DataDynamics.ActiveReports.Shape).Visible = False
		'Catch ex as exception
		'End Try
		'2016/12/1 tsunoda 課題番号986 ゆうメールの簡易書留印字対応↑
		'2016/4/5 paku 課題No768フリーエリア印字可能なユ00582の新規作成↓
		'バーコード
		try
			ctype(me.Detail1.Controls("Barcode1"), DataDynamics.ActiveReports.Barcode).Visible = True
		Catch ex as exception
		End Try
		'フリー項目
		try
			ctype(me.Detail1.Controls("free01"), DataDynamics.ActiveReports.TextBox).Visible = False
		Catch ex as exception
		End Try
	End If
	'2016/4/5 paku 課題No768フリーエリア印字可能なユ00582の新規作成↑
	
	'「別納」，「後納」ラベルの制御
	if rpt.Fields("shiharai_houhou_kbn").Value.tostring() = "1" then
		'別納の場合、「別納」ラベルを印字
		try
			ctype(me.Detail1.Controls("Label2"), DataDynamics.ActiveReports.TextBox).Visible = True
		Catch ex as exception
		End Try
		try
			ctype(me.Detail1.Controls("Label4"), DataDynamics.ActiveReports.TextBox).Visible = False
		Catch ex as exception
		End Try
	else
		'後納の場合、「後納」ラベルを印字
		try
			ctype(me.Detail1.Controls("Label2"), DataDynamics.ActiveReports.TextBox).Visible = False
		Catch ex as exception
		End Try
		try
			ctype(me.Detail1.Controls("Label4"), DataDynamics.ActiveReports.TextBox).Visible = True
		Catch ex as exception
		End Try
	End If
	
	
	'////フォント制御
	'お届け先住所
	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
	else if 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
	else if 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, TODOKEADR_DEF, Font_Size)
	FontSize_Set("receiver_nm_2", receiver_nm_2_Size, TODOKEADR_DEF, Font_Size)
	
	'ご依頼主住所
	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)
	
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


'Sub Detail1_Format
'	try
'		
'		'初期化
'		Label3.Visible = False				'「ゆうメール追跡」文言
'		Label5.Visible = False				'「ゆうメール」文言
'		Label2.Visible = False				'「料金別納」文言
'		Label4.Visible = False				'「料金後納」文言
'		Shape2.Visible = False				'「背景色：黒」
'		Shape4.Visible = False				'「背景色：白」
'		
'		'「ゆうメール」文言，背景色の制御
'		if rpt.Fields("tracking_no_barcode").Value.tostring.length = 0 Then
'			'追跡番号付きの場合、「ゆうメール」を表示。背景色：白，文言色：黒
'			Label3.Visible = False				
'			Label5.Visible = True
'			Shape2.Visible = False
'			Shape4.Visible = True
'		else
'			'追跡番号付きの場合、「ゆうメール追跡」を表示。背景色：黒，文言色：白
'			Label3.Visible = True
'			Label5.Visible = False
'			Shape2.Visible = True
'			Shape4.Visible = False
'		End If
'		
'		
'		'「別納」，「後納」ラベルの制御
'		if rpt.Fields("shiharai_houhou_kbn").Value.tostring() = "1" then
'			'別納の場合、「別納」ラベルを印字
'			Label2.Visible = True
'			Label4.Visible = False
'		else
'			'後納の場合、「後納」ラベルを印字
'			Label2.Visible = False
'			Label4.Visible = True
'		End If
'		
'		
'		'////フォント制御
'		'お届け先住所
'		len = 0
'		len = getByteCount(receiver_adr_1.Text.Trim())
'		
'		if len < getByteCount(receiver_adr_2.Text.Trim()) Then
'			len = getByteCount(receiver_adr_2.Text.Trim())
'		End If
'		
'		if len < getByteCount(receiver_adr_3.Text.Trim()) Then
'			len = getByteCount(receiver_adr_3.Text.Trim())
'		End If
'		
'		if len >= FONT_SMALL then
'			receiver_adr_1.Font = new System.Drawing.Font(receiver_adr_1.Font.FontFamily, TODOKEADR_SMALL)
'			receiver_adr_2.Font = new System.Drawing.Font(receiver_adr_2.Font.FontFamily, TODOKEADR_SMALL)
'			receiver_adr_3.Font = new System.Drawing.Font(receiver_adr_3.Font.FontFamily, TODOKEADR_SMALL)
'		else if len >= FONT_MID and len < FONT_SMALL then
'			receiver_adr_1.Font = new System.Drawing.Font(receiver_adr_1.Font.FontFamily, TODOKEADR_MID)
'			receiver_adr_2.Font = new System.Drawing.Font(receiver_adr_2.Font.FontFamily, TODOKEADR_MID)
'			receiver_adr_3.Font = new System.Drawing.Font(receiver_adr_3.Font.FontFamily, TODOKEADR_MID)
'		else		
'			receiver_adr_1.Font = new System.Drawing.Font(receiver_adr_1.Font.FontFamily, TODOKEADR_LARGE)
'			receiver_adr_2.Font = new System.Drawing.Font(receiver_adr_2.Font.FontFamily, TODOKEADR_LARGE)
'			receiver_adr_3.Font = new System.Drawing.Font(receiver_adr_3.Font.FontFamily, TODOKEADR_LARGE)
'		End If
'		
'		'お届け先名称
'		len = 0
'		len = getByteCount(receiver_nm_1.Text.Trim())
'		
'		if len < getByteCount(receiver_nm_2.Text.Trim()) Then
'			len = getByteCount(receiver_nm_2.Text.Trim())
'		End If
'		
'		if len >= FONT_SMALL then
'			receiver_nm_1.Font = new System.Drawing.Font(receiver_nm_1.Font.FontFamily, TODOKENM_SMALL)
'			receiver_nm_2.Font = new System.Drawing.Font(receiver_nm_2.Font.FontFamily, TODOKENM_SMALL)
'		else if len >= FONT_MID and len < FONT_SMALL then
'			receiver_nm_1.Font = new System.Drawing.Font(receiver_nm_1.Font.FontFamily, TODOKENM_MID)
'			receiver_nm_2.Font = new System.Drawing.Font(receiver_nm_2.Font.FontFamily, TODOKENM_MID)
'		else		
'			receiver_nm_1.Font = new System.Drawing.Font(receiver_nm_1.Font.FontFamily, TODOKENM_LARGE)
'			receiver_nm_2.Font = new System.Drawing.Font(receiver_nm_2.Font.FontFamily, TODOKENM_LARGE)
'		End If
'		
'		'ご依頼主住所
'		len = 0
'		len = getByteCount(kokyaku_adr_1.Text.Trim())
'		
'		if len < getByteCount(kokyaku_adr_2.Text.Trim()) Then
'			len = getByteCount(kokyaku_adr_2.Text.Trim())
'		End If
'		
'		if len < getByteCount(kokyaku_adr_3.Text.Trim()) Then
'			len = getByteCount(kokyaku_adr_3.Text.Trim())
'		End If
'		
'		if len >= FONT_SMALL then
'			kokyaku_adr_1.Font = new System.Drawing.Font(kokyaku_adr_1.Font.FontFamily, NIOKURIADR_SMALL)
'			kokyaku_adr_2.Font = new System.Drawing.Font(kokyaku_adr_2.Font.FontFamily, NIOKURIADR_SMALL)
'			kokyaku_adr_3.Font = new System.Drawing.Font(kokyaku_adr_3.Font.FontFamily, NIOKURIADR_SMALL)
'		else if len >= FONT_MID and len < FONT_SMALL then
'			kokyaku_adr_1.Font = new System.Drawing.Font(kokyaku_adr_1.Font.FontFamily, NIOKURIADR_MID)
'			kokyaku_adr_2.Font = new System.Drawing.Font(kokyaku_adr_2.Font.FontFamily, NIOKURIADR_MID)
'			kokyaku_adr_3.Font = new System.Drawing.Font(kokyaku_adr_3.Font.FontFamily, NIOKURIADR_MID)
'		else		
'			kokyaku_adr_1.Font = new System.Drawing.Font(kokyaku_adr_1.Font.FontFamily, NIOKURIADR_LARGE)
'			kokyaku_adr_2.Font = new System.Drawing.Font(kokyaku_adr_2.Font.FontFamily, NIOKURIADR_LARGE)
'			kokyaku_adr_3.Font = new System.Drawing.Font(kokyaku_adr_3.Font.FontFamily, NIOKURIADR_LARGE)
'		End If
'		
'		'ご依頼主名称
'		len = 0
'		len = getByteCount(kokyaku_nm_1.Text.Trim())
'		
'		if len < getByteCount(kokyaku_nm_2.Text.Trim()) Then
'			len = len = getByteCount(kokyaku_nm_2.Text.Trim())
'		End If
'		
'		if len >= FONT_SMALL then
'			kokyaku_nm_1.Font = new System.Drawing.Font(kokyaku_nm_1.Font.FontFamily, NIOKURINM_SMALL)
'			kokyaku_nm_2.Font = new System.Drawing.Font(kokyaku_nm_2.Font.FontFamily, NIOKURINM_SMALL)
'		else if len >= FONT_MID and len < FONT_SMALL then
'			kokyaku_nm_1.Font = new System.Drawing.Font(kokyaku_nm_1.Font.FontFamily, NIOKURINM_MID)
'			kokyaku_nm_2.Font = new System.Drawing.Font(kokyaku_nm_2.Font.FontFamily, NIOKURINM_MID)
'		else		
'			kokyaku_nm_1.Font = new System.Drawing.Font(kokyaku_nm_1.Font.FontFamily, NIOKURINM_LARGE)
'			kokyaku_nm_2.Font = new System.Drawing.Font(kokyaku_nm_2.Font.FontFamily, NIOKURINM_LARGE)
'		End If
'		
'	Catch ex as Exception
'		msgbox(ex.Message + ex.StackTrace.ToString())
'	End Try
'
'End Sub
'	
'
'Private function getByteCount(ByVal str as string) as integer
'
'	'サロゲート文字で文字数判定ＯＫ
'	Dim dt As System.Globalization.StringInfo
'	Dim num As Integer
'	Dim dispnum As Integer
'
'
'	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
'
'	return dispnum
'
'End Function]]></Script>
  <PageSettings LeftMargin="0" RightMargin="0" TopMargin="0" BottomMargin="0" PaperSize="9" PaperWidth="11906" PaperHeight="16838" PaperName="" Orientation="1" />
  <Parameters />
</ActiveReportsLayout>