PDA

View Full Version : سوال: اكسپورت كردن اكتيوريپورت به pdf,excel,access



hamidghasemi
شنبه 02 شهریور 1387, 17:00 عصر
سلام
من مي خوام در داخل يك اكتيو ريپورت هايپر لينك بذارم وبا كليك بر روي آن فايلهاي اشاره شده را توليد كنم .
درضمن چگونه مي شود مسير رو از طريق يك explorer مثل شكل زير مشخص نمود.
:متفکر:

hamidghasemi
سه شنبه 05 شهریور 1387, 10:46 صبح
سلام لطفاً كمك كنيد

hrj1981
سه شنبه 05 شهریور 1387, 12:06 عصر
دوست عزيز اكتيو ريپورت اين قابليتها را كه شما مي خواهيد داره ، سعي مي كنم يك نمونه ساده برايتان آماده كنم ، ولي براي اينكه سريعتر مشكلت حل شود در خود وب سايت DATADYNAMICS در قسمت دانلود و در بخش اكتيو ريپورت يك PDF نسبتا كامل جهت اكسپورت گيري از گزارش ها داره.

ASKaffash
سه شنبه 05 شهریور 1387, 17:24 عصر
سلام
اینهم سورس نمونه :


Private Sub Form_Load()
With Me.List1
.AddItem "Convert To Microsoft Office Excel (XLS)"
.AddItem "Convert To HTML Format (HTM)"
.AddItem "Convert To Text File (TXT)"
.AddItem "Convert To RTF Format (WordPad+Microsoft Word+...)"
.AddItem "Convert To Image Format (TIFF)"
.AddItem "Convert To Acrobat Reader (PDF)"
.ListIndex = 0
End With
End Sub
Private Sub List1_Click()
Me.StatusBar1.Panels(1).Text = LastActiveReport.LastExportPath + LastActiveReport.LastFileName + "." + ExportFileExt()
Me.StatusBar2.Panels(1).Text = ""
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Me.StatusBar2.Panels(1).Text = ""
If Button.Key = "File" Then
Me.CommonDialog1.CancelError = True
With Me.CommonDialog1
.DialogTitle = "ÇäÊÍÇÈ ÝÇíá"
.Filter = Me.List1.Text + "|*." + ExportFileExt()
.FileName = LastActiveReport.LastFileName
.InitDir = LastActiveReport.LastExportPath
On Error GoTo EndExport
.ShowOpen
On Error GoTo 0
TmpAt = At("\", Me.CommonDialog1.FileName, Occu("\", Me.CommonDialog1.FileName))
If TmpAt <> 0 Then
LastActiveReport.LastExportPath = Mid(Me.CommonDialog1.FileName, 1, TmpAt)
LastActiveReport.LastFileName = Mid(Me.CommonDialog1.FileName, TmpAt + 1)
TmpAt = At(".", LastActiveReport.LastFileName, Occu(".", Me.CommonDialog1.FileName))
If TmpAt <> 0 Then
LastActiveReport.LastFileName = Mid(LastActiveReport.LastFileName, 1, TmpAt - 1)
Call List1_Click
End If
End If
End With
Else
If LastActiveReport.Pages.Count = 0 Then
Beep
Exit Sub
End If
Me.StatusBar2.Panels(1).Text = "ÏÑÍÇá ÇíÌÇÏ ÝÑãÊ ÏÑÎæÇÓÊí"
Select Case ExportFileExt
Case "XLS"
Dim oXLS As ActiveReportsExcelExport.ARExportExcel
Set oXLS = New ActiveReportsExcelExport.ARExportExcel
oXLS.FileName = LastActiveReport.LastExportPath + LastActiveReport.LastFileName + "." + ExportFileExt()
oXLS.Export LastActiveReport.Pages
Set oXLS = Nothing
Case "HTM"
Dim oHTML As HTMLexport
Set oHTML = New HTMLexport
oHTML.FileNamePrefix = LastActiveReport.LastFileName
oHTML.HTMLOutputPath = LastActiveReport.LastExportPath
oHTML.Export LastActiveReport.Pages
Set oHTML = Nothing
Case "TXT"
Dim oTEXT As ActiveReportsTextExport.ARExportText
Set oTEXT = New ActiveReportsTextExport.ARExportText
oTEXT.ByteOrderMark = True
oTEXT.PageDelimiter = Chr(12)
oTEXT.TextDelimiter = Chr(9)
oTEXT.Unicode = True
oTEXT.SuppressEmptyLines = False
oTEXT.FileName = LastActiveReport.LastExportPath + LastActiveReport.LastFileName + "." + ExportFileExt()
oTEXT.Export LastActiveReport.Pages
Set oTEXT = Nothing
Case "RTF"
Dim oRTF As ActiveReportsRTFExport.ARExportRTF
Set oRTF = New ActiveReportsRTFExport.ARExportRTF
oRTF.FileName = LastActiveReport.LastExportPath + LastActiveReport.LastFileName + "." + ExportFileExt()
oRTF.Export LastActiveReport.Pages
Set oRTF = Nothing
Case "TIFF"
Dim oTIFF As ActiveReportsTIFFExport.TIFFExport
Set oTIFF = New ActiveReportsTIFFExport.TIFFExport
oTIFF.FileName = LastActiveReport.LastExportPath + LastActiveReport.LastFileName + "." + ExportFileExt()
oTIFF.Export LastActiveReport.Pages
Set oTIFF = Nothing
Case "PDF"
Dim oPDF As ActiveReportsPDFExport.ARExportPDF
Set oPDF = New ActiveReportsPDFExport.ARExportPDF
oPDF.AcrobatVersion = DDACR40
oPDF.SemiDelimitedNeverEmbedFonts = ""
oPDF.OutputTOCAsBookmarks = True
oPDF.ShowBookmarksInAcrobat = True
oPDF.JPGQuality = 100
oPDF.FileName = LastActiveReport.LastExportPath + LastActiveReport.LastFileName + "." + ExportFileExt()
On Error Resume Next
Err.Number = 0
oPDF.Export LastActiveReport.Pages
If Err.Number <> 0 Then
Me.StatusBar2.Panels(1).Text = "ÎØÇí ÇÓÊÝÇÏå ÇÒÝæäÊ"
GoTo EndExport
End If
On Error GoTo 0
Set oPDF = Nothing
End Select
Me.StatusBar2.Panels(1).Text = "ÝÇíá ãæÑÏ äÙÑ ÇíÌÇÏ ÔÏ"
End If
EndExport:
End Sub
Private Function ExportFileExt() As String
ExportFileExt = Choose(Me.List1.ListIndex + 1, "XLS", "HTM", "TXT", "RTF", "TIFF", "PDF")
End Function