<?xml version="1.0" encoding="UTF-8"?>
<ActiveReportsLayout Version="3.1" PrintWidth="11910" 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="5584.252" ColumnCount="2" ColumnDirection="1" BackColor="16777215" KeepTogether="1">
      <Control Type="AR.Image" Name="Picture1" Left="88.44095" Top="73.7008" Width="5694.237" Height="5368.819" LineWeight="0" PictureAlignment="0">[encoded data, 417100 characters]</Control>
      <Control Type="AR.Field" Name="receiver_zip_1" DataField="receiver_zip_1" Left="494.9291" Top="270.9921" Width="226.7717" Height="288" Text="9" CanGrow="0" Style="font-family: MS Gothic; font-size: 14pt; text-align: center; white-space: nowrap" />
      <Control Type="AR.Field" Name="receiver_zip_2" DataField="receiver_zip_2" Left="751.1811" Top="270.9921" Width="226.7717" Height="288" Text="9" CanGrow="0" Style="font-family: MS Gothic; font-size: 14pt; text-align: center; white-space: nowrap" />
      <Control Type="AR.Field" Name="receiver_zip_3" DataField="receiver_zip_3" Left="1019.339" Top="270.9921" Width="226.7717" Height="288" Text="9" CanGrow="0" Style="font-family: MS Gothic; font-size: 14pt; text-align: center; white-space: nowrap" />
      <Control Type="AR.Field" Name="receiver_zip_4" DataField="receiver_zip_4" Left="1318.11" Top="270.9921" Width="226.7717" Height="288" Text="9" CanGrow="0" Style="font-family: MS Gothic; font-size: 14pt; text-align: center; white-space: nowrap" />
      <Control Type="AR.Field" Name="receiver_zip_5" DataField="receiver_zip_5" Left="1571.528" Top="270.9921" Width="226.7717" Height="288" Text="9" CanGrow="0" Style="font-family: MS Gothic; font-size: 14pt; text-align: center; white-space: nowrap" />
      <Control Type="AR.Field" Name="receiver_zip_6" DataField="receiver_zip_6" Left="1839.118" Top="270.9921" Width="226.7717" Height="288" Text="9" CanGrow="0" Style="font-family: MS Gothic; font-size: 14pt; text-align: center; white-space: nowrap" />
      <Control Type="AR.Field" Name="receiver_zip_7" DataField="receiver_zip_7" Left="2122.016" Top="270.9921" Width="224.64" Height="288" Text="9" CanGrow="0" Style="font-family: MS Gothic; font-size: 14pt; text-align: center; white-space: nowrap" />
      <Control Type="AR.Field" Name="kokyaku_zip_7" DataField="kokyaku_zip_7" Left="2136.189" Top="3182.74" Width="224.64" Height="288" Text="9" CanGrow="0" Style="font-family: MS Gothic; font-size: 14pt; text-align: center; white-space: nowrap" />
      <Control Type="AR.Field" Name="kokyaku_zip_5" DataField="kokyaku_zip_5" Left="1600.441" Top="3182.74" Width="224.64" Height="288" Text="9" CanGrow="0" Style="font-family: MS Gothic; font-size: 14pt; text-align: center; white-space: nowrap" />
      <Control Type="AR.Field" Name="kokyaku_zip_3" DataField="kokyaku_zip_3" Left="1018.772" Top="3182.74" Width="224.64" Height="288" Text="9" CanGrow="0" Style="font-family: MS Gothic; font-size: 14pt; text-align: center; white-space: nowrap" />
      <Control Type="AR.Field" Name="kokyaku_zip_4" DataField="kokyaku_zip_4" Left="1332.85" Top="3182.74" Width="224.64" Height="288" Text="9" CanGrow="0" Style="font-family: MS Gothic; font-size: 14pt; text-align: center; white-space: nowrap" />
      <Control Type="AR.Field" Name="kokyaku_zip_1" DataField="kokyaku_zip_1" Left="494.3627" Top="3182.74" Width="224.64" Height="288" Text="9" CanGrow="0" Style="font-family: MS Gothic; font-size: 14pt; text-align: center; white-space: nowrap" />
      <Control Type="AR.Field" Name="kokyaku_zip_6" DataField="kokyaku_zip_6" Left="1868.031" Top="3182.74" Width="224.64" Height="288" Text="9" CanGrow="0" Style="font-family: MS Gothic; font-size: 14pt; text-align: center; white-space: nowrap" />
      <Control Type="AR.Field" Name="kokyaku_zip_2" DataField="kokyaku_zip_2" Left="765.3548" Top="3182.74" Width="224.64" Height="288" Text="9" CanGrow="0" Style="font-family: MS Gothic; font-size: 14pt; text-align: center; white-space: nowrap" />
      <Control Type="AR.Field" Name="kokyaku_adr_1" DataField="kokyaku_adr_1" Left="450.1418" Top="3600" Width="3998.551" Height="170.0788" Text="ご依頼主住所" CanGrow="0" Style="font-family: ＭＳ ゴシック; font-size: 6.012pt; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="receiver_nm_1" DataField="receiver_nm_1" Left="450.1418" Top="1724.598" Width="4765.606" Height="187.6535" Text="お届け先名称" Multiline="0" CanGrow="0" Style="font-family: ＭＳ ゴシック; font-size: 9.25pt; vertical-align: top; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="receiver_adr_1" DataField="receiver_adr_1" Left="450.7086" Top="831.6851" Width="4084.724" Height="212.7802" Text="お届け先の住所" CanGrow="0" Style="font-family: ＭＳ ゴシック; font-size: 9.012pt; text-align: left; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="kokyaku_nm_1" DataField="kokyaku_nm_1" Left="450.1418" Top="4207.748" Width="3689.575" Height="170.0788" Text="ご依頼主氏名" CanGrow="0" Style="font-family: ＭＳ ゴシック; font-size: 6.012pt; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="leteral1" DataField="leteral1" Left="5123.905" Top="4296.189" Width="412.1579" Height="154.2048" Text="YR01" CanGrow="0" Style="font-family: MS Gothic; font-size: 8pt; white-space: nowrap; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="receiver_adr_2" DataField="receiver_adr_2" Left="450.8448" Top="1030.859" Width="4084.724" Height="212.7802" Text="お届け先の住所" CanGrow="0" Style="font-family: ＭＳ ゴシック; font-size: 9.012pt; text-align: left; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="receiver_adr_3" DataField="receiver_adr_3" Left="450.7086" Top="1245.543" Width="4084.724" Height="212.7802" Text="お届け先の住所" CanGrow="0" Style="font-family: ＭＳ ゴシック; font-size: 9.012pt; text-align: left; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="receiver_nm_2" DataField="receiver_nm_2" Left="450.1418" Top="1870.866" Width="4765.606" Height="187.6535" Text="お届け先名称" CanGrow="0" Style="font-family: ＭＳ ゴシック; font-size: 9.25pt; vertical-align: top; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="kokyaku_adr_2" DataField="kokyaku_adr_2" Left="450.1418" Top="3741.732" Width="3998.551" Height="170.0788" Text="ご依頼主住所" CanGrow="0" Style="font-family: ＭＳ ゴシック; font-size: 6.012pt; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="kokyaku_adr_3" DataField="kokyaku_adr_3" Left="450.1418" Top="3883.464" Width="3998.551" Height="170.0788" Text="ご依頼主住所" CanGrow="0" Style="font-family: ＭＳ ゴシック; font-size: 6.012pt; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="kokyaku_nm_2" DataField="kokyaku_nm_2" Left="450.1418" Top="4347.78" Width="3689.575" Height="170.0788" Text="ご依頼主氏名" CanGrow="0" Style="font-family: ＭＳ ゴシック; font-size: 6.012pt; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="free01" DataField="free01" Left="2256.378" Top="1561.323" Width="2099.906" Height="170.0788" Text="フリー項目１" CanGrow="0" Style="font-family: ＭＳ ゴシック; font-size: 8.012pt; vertical-align: top; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="free02" DataField="free02" Left="2256.378" Top="4072.819" Width="2074.609" Height="140.5986" Text="フリー項目２" CanGrow="0" Style="font-family: ＭＳ ゴシック; font-size: 6.012pt; vertical-align: top; white-space: inherit; ddo-char-set: 1" />
      <Control Type="AR.Field" Name="tracking_no_fmt" DataField="tracking_no_fmt" Left="306.7087" Top="5034.897" Width="3036.472" Height="312.9449" Text="XXXX-XXXX-XXXX" Multiline="0" CanGrow="0" Style="font-family: ＭＳ ゴシック; font-size: 15.75pt; text-align: left; vertical-align: middle; ddo-char-set: 128" />
      <Control Type="AR.Barcode" Name="Barcode1" DataField="tracking_no_barcode" Left="2557.984" Top="2211.591" Width="2944.63" Height="755.7164" BarStyle="16" Text="Barcode1" CaptionPos="2" Checksum="0" Font="Courier New" FontSize="8" CODE128="0;0;0" />
      <Control Type="AR.Field" Name="kyokudome_Label" Left="1290.331" Top="561.2598" Width="1100.409" Height="270.4252" Text="郵便局留" CanGrow="0" Style="background-color: Black; color: White; font-family: ＭＳ ゴシック; font-size: 13pt; vertical-align: top; white-space: inherit; 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 
	
'商品名（MAX:50Byte）
'const HIN_SMALL as integer = 40
'const HIN_MID as integer = 25	

'フリー項目（MAX:50Byte）
const FREENM_SMALL as integer = 40
const FREENM_MID as integer = 25

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

''2013.09.02 K.Takasaki@fuso 課題No199 フォント統一制御,レイアウトカスタマイズ対応,郵便局留め対応 ↓↓
'ご依頼主住所フォント定義
const NIOKURIADR_LARGE as integer = 8
const NIOKURIADR_MID as integer = 8
const NIOKURIADR_SMALL as integer = 7
'const NIOKURIADR_LARGE as integer = 6.5
'const NIOKURIADR_MID as integer = 6.5
'const NIOKURIADR_SMALL as integer = 6.5

'ご依頼主名称フォント定義
const NIOKURINM_LARGE as integer = 8
const NIOKURINM_MID as integer = 8
const NIOKURINM_SMALL as integer = 7
'const NIOKURINM_LARGE as integer = 6.5
'const NIOKURINM_MID as integer = 6.5
'const NIOKURINM_SMALL as integer = 6.5
''2013.09.02 K.Takasaki@fuso 課題No199 フォント統一制御,レイアウトカスタマイズ対応,郵便局留め対応 ↑↑

'商品名フォント定義
'const SHOHIN_LARGE as integer = 14
'const SHOHIN_MID as integer = 11
'const SHOHIN_SMALL as integer = 10

'フリー項目フォント定義
const FREE_LARGE as integer = 6
const FREE_MID as integer = 5
const FREE_SMALL as integer = 4

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

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

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

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

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

'商品名デフォルトサイズ定義
'const SHOHIN_DEF as double = 9.012

'フリー項目デフォルトサイズ定義
const FREE_1_DEF as double = 8.012
const FREE_2_DEF as double = 6.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 shohin_nm001_Size as double

'フリー項目フォント定義
dim free01_Size as double
dim free02_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

	'商品名フォント定義
'	try
'		shohin_nm001_Size = ctype(me.Detail1.Controls("shohin_nm001"), DataDynamics.ActiveReports.TextBox).Font.Size
'	Catch ex as exception
'	End Try

	'フリー項目フォント定義
	try
		free01_Size = ctype(me.Detail1.Controls("free01"), DataDynamics.ActiveReports.TextBox).Font.Size
	Catch ex as exception
	End Try
	try
		free02_Size = ctype(me.Detail1.Controls("free02"), DataDynamics.ActiveReports.TextBox).Font.Size
	Catch ex as exception
	End Try
	
End Sub

Sub Detail1_Format
	
	'初期化
	try
		ctype(me.Detail1.Controls("kyokudome_Label"), DataDynamics.ActiveReports.TextBox).Visible = False	'郵便局留ラベル
	Catch ex as exception
	End Try
	
	'郵便局留対応
	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
		
	
	'////フォント制御
	'お届け先住所
	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, TODOKENM_DEF, Font_Size)
	FontSize_Set("receiver_nm_2", receiver_nm_2_Size, TODOKENM_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)	
			
	'商品名
'	len = 0
'	len = getByteCount("shohin_nm001")
'
'	if len >= HIN_SMALL then
'		Font_Size = SHOHIN_SMALL
'	else if len >= HIN_MID and len < HIN_SMALL then
'		Font_Size = SHOHIN_MID
'	else
'		Font_Size = SHOHIN_LARGE
'	End If
'	FontSize_Set("shohin_nm001", shohin_nm001_Size, SHOHIN_DEF, Font_Size)
	
	'フリー項目１
	len = 0
	len = getByteCount("free01")

	if len >= FREENM_SMALL then
		Font_Size = FREE_SMALL
	else if len >= FREENM_MID and len < FREENM_SMALL then
		Font_Size = FREE_MID
	else
		Font_Size = FREE_LARGE
	End If
	FontSize_Set("free01", free01_Size, FREE_1_DEF, Font_Size)
	
	'フリー項目２
	len = 0
	len = getByteCount("free02")

	if len >= FREENM_SMALL then
		Font_Size = FREE_SMALL
	else if len >= FREENM_MID and len < FREENM_SMALL then
		Font_Size = FREE_MID
	else
		Font_Size = FREE_LARGE
	End If
	FontSize_Set("free02", free02_Size, FREE_2_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
'		
'		'////フォント制御
'		'お届け先住所
'		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
'				
'		'商品名
'		len = 0
'		len = getByteCount(shohin_nm001.Text.Trim())
'		if len >= HIN_SMALL then
'			shohin_nm001.Font = new System.Drawing.Font(shohin_nm001.Font.FontFamily, SHOHIN_SMALL)
'		else if len >= HIN_MID and len < HIN_SMALL then
'			shohin_nm001.Font = new System.Drawing.Font(shohin_nm001.Font.FontFamily, SHOHIN_MID)
'		else		
'			shohin_nm001.Font = new System.Drawing.Font(shohin_nm001.Font.FontFamily, SHOHIN_LARGE)
'		End If
'		
'		'フリー項目１
'		len = 0
'		len = getByteCount(free01.Text.Trim())
'		if len >= FREENM_SMALL then
'			free01.Font = new System.Drawing.Font(free01.Font.FontFamily, SmallFREE_SMALL)
'		else if len >= FREENM_MID and len < FREENM_SMALL then
'			free01.Font = new System.Drawing.Font(free01.Font.FontFamily, SmallFREE_MID)
'		else		
'			free01.Font = new System.Drawing.Font(free01.Font.FontFamily, SmallFREE_LARGE)
'		End If
'		
'		'フリー項目２
'		len = 0
'		len = getByteCount(free02.Text.Trim())
'		if len >= FREENM_SMALL then
'			free02.Font = new System.Drawing.Font(free02.Font.FontFamily, SmallFREE_SMALL)
'		else if len >= FREENM_MID and len < FREENM_SMALL then
'			free02.Font = new System.Drawing.Font(free02.Font.FontFamily, SmallFREE_MID)
'		else		
'			free02.Font = new System.Drawing.Font(free02.Font.FontFamily, SmallFREE_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
''2013.09.02 K.Takasaki@fuso 課題No199 フォント統一制御,レイアウトカスタマイズ対応,郵便局留め対応 ↑↑]]></Script>
  <PageSettings LeftMargin="0" RightMargin="0" TopMargin="0" BottomMargin="0" PaperSize="9" PaperWidth="11906" PaperHeight="16838" PaperName="" Orientation="1" />
  <Parameters />
</ActiveReportsLayout>