- PR -

ActiveReportで、複数種類の帳票の印刷

投稿者投稿内容
アリババ
会議室デビュー日: 2002/10/28
投稿数: 12
投稿日時: 2005-10-11 12:02
>Dim rpt1 As New rptChumonsho '請求書
>Dim rpt2 As New rptChumonsho '請求書(控)

>rpt1.Run(False) '請求書
>rpt2.Run(False) '請求書(控)

>For i = 0 To rpt2.Document.Pages.Count - 1
>   rpt1.Document.Pages.Add(rpt2.Document.Pages(i))
>Next
ソースを見る限り、rpt1で請求書(2種)作成後、請求書(控)を作成しているように思います。
rptを請求書A、請求書B、請求書A(控)、請求書B(控)をそれぞれ作成し
請求書A→請求書A(控)→請求書B→請求書B(控)とADDすればいいともいます。




amulo
会議室デビュー日: 2005/11/23
投稿数: 1
投稿日時: 2005-11-23 20:05
ちょっと回答が遅いですが
Dim rpt_MEIN As New ActiveReports 'ダミー
Dim rpt1 As New rptChumonsho '請求書
Dim rpt2 As New rptChumonsho '請求書(控)

j=0
for i= 0
rpt_MEIN.Document.Pages.Add
rpt_MEIN.Document.Pages(i) = rpt1.Document.Pages(j)
i = i + 1
rpt_MEIN.Document.Pages.Add
rpt_MEIN.Document.Pages(i) = rpt2.Document.Pages(j)
j = j + 1
NEXT i

文法が間違っているかもしれませんが、今のようにやれば出来ます
ただ、請求書が2ページにまたがった場合
請求書A→請求書A(控)→請求書A(2頁目)→請求書A(控)(A2頁目)→請求書B→請求書B(控)
と出てしまいます。
この解決方法が見つかれば完璧なのですが!


スキルアップ/キャリアアップ(JOB@IT)