PDA

View Full Version : سوال: تشخیص ردیف جهت چاپ



moghadam1372
یک شنبه 17 شهریور 1392, 06:47 صبح
با سلام

گزارشگیری من با اکتیو ریپورت می باشد و می خواهم ردیفی که در کارت چاپ می شود در محل خودش باشد

مثل چاپ دفترچه های بانکی مثلا اگر در یک کارت 14ردیف چاپ شده است دفعه بعد ردیف 15چاپ بشود ؟؟؟؟

moghadam1372
شنبه 20 مهر 1392, 22:41 عصر
کسی نبود جواب بدهد

amir2844
پنج شنبه 14 آذر 1392, 23:51 عصر
عزیزم. این نیاز به برنامه نویسی داره. سورست رو بزار یا حداقل یه تیکه از اون رو بزار ببینم چی میخوای بنویسی تو گزارشت. میشه کاریش کرد

moghadam1372
شنبه 07 دی 1392, 19:31 عصر
با سلام

با این کد نویسی مشکل من حل شد امیدوارم که مورد استفاده دیگران نیز قرار بگیرد

با این کد ها ردیفها در محل خودش پرفراژ می شود و هم می توان دستورداد که به از مثلا 10ردیف دوباره از اول کارت شروع کند وهم ردیفی که در کارت مشتری پرفراژ نشده باشد سری بعد که مشتری مراجعه کند رکورد های که چاپ نشده باشد پشت سرهم به ترتیب پرفراژ می کند


Dim a As Integer
a = Text1.Text
Dim count As Integer
count = 0
Dim countprint As Integer
countprint = 0
Dim countchap As Integer
countchap = 0
sql = "SELECT * from amal WHERE print = 0 and Left(codm, " & Len(Text1) & ")='" & Trim(Text1) & "'order by radif asc"
Adodc5.RecordSource = sql
Adodc5.Refresh
countprint = Adodc5.Recordset.RecordCount
sql1 = "SELECT * from amal WHERE chap = 0 and Left(codm, " & Len(Text1) & ")='" & Trim(Text1) & "'order by radif asc"
Adodc5.RecordSource = sql1
Adodc5.Refresh
countchap = Adodc5.Recordset.RecordCount
count = (countprint - countchap) + 1
ActiveReport7.PageHeader.Height = count * (Text7.Text)
ActiveReport7.Field9.Height = (Text9.Text)
ActiveReport7.Field21.Height = (Text9.Text)
ActiveReport7.Field6.Height = (Text9.Text)
ActiveReport7.Field7.Height = (Text9.Text)
ActiveReport7.Field3.Height = (Text9.Text)
ActiveReport7.Detail.Height = (Text9.Text)
ActiveReport7.Field1 = Text1.Text

'ActiveReport7.Show
ActiveReport7.PrintReport False
'ActiveReport7.Hide


XPButton3_Click
sql = "SELECT * from amal WHERE print = 0 and Left(codm, " & Len(Text1) & ")='" & Trim(Text1) & "'order by radif asc"
Adodc5.RecordSource = sql
Adodc5.Refresh
If Adodc5.Recordset.RecordCount >= Text8.Text Then
Adodc5.Recordset.MoveFirst
Dim i1 As Integer
For i1 = 1 To Text8.Text
Adodc5.Recordset.Fields!print = "1"
Adodc5.Recordset.Update
Adodc5.Refresh
Adodc5.Recordset.MoveNext
Next i1
Else
End If