monm قام بنشر أبريل 9, 2019 قام بنشر أبريل 9, 2019 نعود مرة أخرى للمبدعين وخاصة استاذنا جعفر وعودا محمودا التقرير الذى تم عمله من قبل فى غاية الامتياز ولكن..... عند استخدامة فى إدارة واحدة تكون النتائج ممتازة عند استخدام اكثر من إدارة الأمور تتعقد ارجو الحل تجارب.mdb
jjafferr قام بنشر أبريل 12, 2019 قام بنشر أبريل 12, 2019 السلام عليكم 🙂 في الماضي كان عندنا معيار واحد فقط (التاريخ) ، بينما الآن اصبح عندنا معيارين (التاريخ و الادارة) ، وهذا اخذ مني اكثر من يومين للوصول اليه !! على العموم ، نظّفت الكود بطريقة اخرى ، والعرض اصبح الآن يأخذ الصفحة كاملة ، وعلى اساسه يعمل عرض الحقول 🙂 وهذا الكود كاملا: Private Sub Report_Open(Cancel As Integer) Dim ctrl As Control Dim A As Integer Dim Empty_Cells As Integer Dim Full_Cells As Integer Dim W As Integer Dim myWhere As String Dim rpt_width As Integer Dim Full_Date As Date Dim D As Integer Dim Y As Integer Dim M As Integer 'W = 2200 / 4 'field width Empty_Cells = 0 Full_Cells = 0 'the name rpt_width = 0 Y = Forms!Report!iYear 'year M = Forms!Report!iMonth 'month 'lets fit/expand the controld based on the avaible width 'how many Full_Cells For D = 1 To 31 Full_Date = DateSerial(Y, M, D) myWhere = "[edara]='" & Forms!Report!cmd_edara_N & "'" myWhere = myWhere & " And " myWhere = myWhere & "[zeiara_date]=" & DateFormat(Full_Date) A = DCount("*", "zeara", myWhere) If A <> 0 Then Full_Cells = Full_Cells + 1 End If Next D W = Me.Width - (Me.Printer.LeftMargin + Me.Printer.RightMargin + Me("mogh_name").Width) W = W / (Full_Cells - 1) For D = 1 To 31 Full_Date = DateSerial(Y, M, D) 'the field Names from the Crosstab query 'check if this field exists int the table myWhere = "[edara]='" & Forms!Report!cmd_edara_N & "'" myWhere = myWhere & " And " myWhere = myWhere & "[zeiara_date]=" & DateFormat(Full_Date) A = DCount("*", "zeara", myWhere) If A = 0 Then 'field dose not exist Me("txt_" & D).Width = 0 'trim field size to Zero Me("txt_" & D).Visible = False 'make the field invisible Me("txt_" & D).ControlSource = "" 'remove the Control Source Me("lbl_" & D).Width = 0 'trim label size to Zero Me("lbl_" & D).Visible = False 'make the label invisible Empty_Cells = Empty_Cells + 1 'Debug.Print "Off " & Me("txt_" & D).Name & vbTab & "D:" & D & vbTab & "Full:" & Full_Date & vbTab & "A:" & A Else 'field exists Me("txt_" & D).Width = 1 * W 'set the field width Me("txt_" & D).Visible = True 'make the field visible Me("txt_" & D).ControlSource = Full_Date Me("lbl_" & D).Width = 1 * W 'set the label width Me("lbl_" & D).Visible = True 'make the label visible Me("lbl_" & D).Caption = D & "/" & M 'give the label, a caption Full_Cells = Full_Cells + 1 rpt_width = rpt_width + Me("txt_" & D).Width 'add the width 'Debug.Print "ON " & Me("txt_" & D).Name & vbTab & "D:" & D & vbTab & "Full:" & Full_Date & vbTab & "A:" & A End If Next D Me.Width = rpt_width + Me("mogh_name").Width 'the final Report width End Sub جعفر 1030.rpt_Monthly_Crosstaby.mdb 4 2
monm قام بنشر أبريل 13, 2019 الكاتب قام بنشر أبريل 13, 2019 صبحك الله بكل خير وجعله فى ميزان حسناتك ان شاء الله وجارى تنفيذ العمل ان شاء الله
monm قام بنشر أبريل 13, 2019 الكاتب قام بنشر أبريل 13, 2019 أخلاق عالية ومعلومات غالية من انسان ذو همة عالية جعله الله فى ميزان حسناتك ان شاء الله واسعد بك والديك فى الدنيا والآخرة
الردود الموصى بها
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.