<?xml version="1.0" encoding="UTF-8"?>
<ActiveReportsLayout Version="3.1" PrintWidth="6193.201" 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="3603.402" ColumnDirection="1" BackColor="16777215" KeepTogether="1">
      <Control Type="AR.Image" Name="Picture1" Left="0" Top="65.19685" Width="6249.828" Height="3538.205" LineWeight="0" SizeMode="1">[encoded data, 61488 characters]</Control>
      <Control Type="AR.Field" Name="receiver_zip_1" DataField="receiver_zip_1&#xD;&#xA;" Left="2948.031" Top="265.8898" Width="340.1577" Height="510.2362" Text="9" Style="font-family: ＭＳ ゴシック; 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="265.8898" Width="340.1575" Height="510.2362" Text="9" Style="font-family: ＭＳ ゴシック; 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="265.8898" Width="340.1575" Height="510.2362" Text="9" Style="font-family: ＭＳ ゴシック; 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="265.8898" Width="340.1575" Height="510.2362" Text="9" Style="font-family: ＭＳ ゴシック; 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="265.8898" Width="340.1575" Height="510.2362" Text="9" Style="font-family: ＭＳ ゴシック; 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="265.8898" Width="340.1575" Height="510.2362" Text="9" Style="font-family: ＭＳ ゴシック; font-size: 20pt; text-align: center; vertical-align: middle; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="Shitei_sbt2" Left="1417.323" Top="226.7716" Width="1133.858" Height="566.9291" 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="receiver_adr_1" DataField="receiver_adr_1" Left="1722.331" Top="850.3936" 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="3175.939" Top="2383.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="4452.661" Top="2383.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="3174.803" Top="2534.173" 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.Shape" Name="Shape3" Left="283.4646" Top="226.7717" Width="1141.228" Height="286.2992" BackStyle="1" RoundingRadius="9.999999" />
      <Control Type="AR.Field" Name="Label2" Left="283.4646" Top="226.7715" Width="1141.228" Height="286.2992" Text="料金別納" Style="font-family: ＭＳ ゴシック; font-size: 9.75pt; font-weight: normal; text-align: center; vertical-align: middle; ddo-char-set: 128" />
      <Control Type="AR.Field" Name="receiver_adr_2" DataField="receiver_adr_2" Left="1722.331" Top="1020.472" 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="receiver_adr_3" DataField="receiver_adr_3" Left="1722.331" Top="1190.551" 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="1723.465" Top="1530.709" 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="3174.803" Top="2671.937" 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="todoke_keisho_kbn_nm" DataField="todoke_keisho_kbn_nm" Left="5263.37" Top="1360.63" 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="5725.983" Top="2939.528" 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.Barcode" Name="Barcode1" DataField="tracking_no_barcode" Left="283.4646" Top="2389.039" Width="2661.732" Height="740.9764" BarStyle="16" Text="Barcode1" CaptionPos="2" Checksum="0" Font="ＭＳ Ｐゴシック" FontSize="5" CODE128="0;0;0" />
      <Control Type="AR.Field" Name="kokyaku_zip_2" DataField="kokyaku_zip_2" Left="4728.755" Top="2383.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="4867.086" Top="2383.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="4990.679" Top="2383.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="5272.441" Top="2383.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="4598.364" Top="2383.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="5132.414" Top="2383.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="5399.435" Top="2383.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="4478.74" Top="265.8898" Width="340.1575" Height="510.2362" Text="9" Style="font-family: ＭＳ ゴシック; font-size: 20pt; text-align: center; vertical-align: middle; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="kokyaku_zip_7" DataField="kokyaku_zip_7" Left="5541.167" Top="2383.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_adr_3" DataField="kokyaku_adr_3" Left="3174.803" Top="2802.332" 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="kokyaku_nm_1" DataField="kokyaku_nm_1" Left="3174.803" Top="2939.528" 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="3174.803" Top="3076.157" 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="1722.331" Top="1360.63" 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="283.4646" Top="226.7717" Width="1141.228" Height="286.2992" Text="料金後納" Style="font-family: ＭＳ ゴシック; font-size: 9.75pt; font-weight: normal; text-align: center; vertical-align: middle; ddo-char-set: 128" />
      <Control Type="AR.Field" Name="Shitei_sbt" Left="1417.323" Top="226.7717" 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="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="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="lbl_shohin_nm" Left="1724.598" Top="1757.48" Width="510.2362" Height="198.4252" Text="品名/" CanGrow="0" Style="font-family: ＭＳ ゴシック; font-size: 8pt; white-space: nowrap; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="shohin_nm001" DataField="shohin_nm001" Left="2249.575" Top="1757.48" Width="3419.716" Height="168.378" Text="品名１" Style="font-family: ＭＳ ゴシック; font-size: 6.012pt; ddo-char-set: 1" />
      <Control Type="AR.Barcode" Name="customer_barcode" DataField="customer_barcode" Left="1870.866" Top="2040.945" 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="311.811" Top="1332.283" 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="283.4646" Top="793.7007" Width="1417.323" Height="331.6537" Text="仕分番号" CanGrow="0" Style="font-family: ＭＳ ゴシック; font-size: 15.75pt; text-align: center; vertical-align: middle; white-space: nowrap; ddo-char-set: 128" />
      <Control Type="AR.Field" Name="TextBox3" Left="2607.874" Top="283.4646" Width="344.9999" Height="510.2362" Text="〒" Style="font-size: 20.25pt; text-align: center; vertical-align: middle" />
      <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.Shape" Name="Shape2" Left="283.4646" Top="226.7715" Width="1142.362" Height="283.4646" BackColor="16777215" RoundingRadius="9.999999" />
    </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

'20141114 T.Tsunoda@fuso 課題No.910 品名を表示させる　↓↓
'商品名フォント定義
const SHOHIN_LARGE as double = 8
const SHOHIN_MID as double = 7
const SHOHIN_SMALL as double = 6
'20141114 T.Tsunoda@fuso 課題No.910 品名を表示させる　↑↑

'文字列カウント用変数
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

'20141114 T.Tsunoda@fuso 課題No.910 品名を表示させる　↓↓
'商品名デフォルトサイズ定義
const SHOHIN_DEF as double = 6.012
'20141114 T.Tsunoda@fuso 課題No.910 品名を表示させる　↑↑

''現在の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

'20141114 T.Tsunoda@fuso 課題No.910 品名を表示させる　↓↓
'商品名フォント定義
dim shohin_nm001_Size as double
'20141114 T.Tsunoda@fuso 課題No.910 品名を表示させる　↑↑

'フォントサイズ
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

	'20141114 T.Tsunoda@fuso 課題No.910 品名を表示させる　↓↓
	'商品名フォント定義
	try
		shohin_nm001_Size = ctype(me.Detail1.Controls("shohin_nm001"), DataDynamics.ActiveReports.TextBox).Font.Size
	Catch ex as exception
	End Try
	'20141114 T.Tsunoda@fuso 課題No.910 品名を表示させる　↓↓
	
End Sub

Sub Detail1_Format
		
	'初期化
	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
	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
	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
	try
		ctype(me.Detail1.Controls("kyokudome_Label"), DataDynamics.ActiveReports.TextBox).Visible = False	'郵便局留ラベル
	Catch ex as exception
	End Try
	'付加サービス（初期化）
	'可視
	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
	
	'「ゆうメール」文言，背景色の制御
	if rpt.Fields("tracking_no_barcode").Value.tostring.length = 0 Then
		'追跡番号付きの場合、「ゆうメール」を表示。背景色：白，文言色：黒
		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
		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
	else
		'追跡番号付きの場合、「ゆうメール追跡」を表示。背景色：黒，文言色：白
		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
		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
	End If
	
	
	'「別納」，「後納」ラベルの制御
	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)	

    '20141114 T.Tsunoda@fuso 課題No.910 品名を表示させる　↓↓	
    '商品名
	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)

	'見出しの表示
	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
    '20141114 T.Tsunoda@fuso 課題No.910 品名を表示させる　↑↑

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" Orientation="1" />
  <Parameters />
</ActiveReportsLayout>