If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Access 2007 Runtime - Export Report
I would like to be able to export reports from an Access 2007 program in
runtime. The Report Preview Ribbon doesn't have the Export group on it. I created a custom Ribbon and it worked fine until I ran the program in runtime mode. The Export tab was blank again. I have tried using TransferSpreadsheet, but I have many reports that the user chooses filters for and I open the report with a 'Where' clause. The TransferSpreadsheet only transfers the underlying query, not with the filters. The Export Button works perfectly for this but is missing in the runtime. Is there a way to filter Data in TransferSpreadsheet, or a way to put the Export button on a Ribbon in a runtime? |
#2
|
|||
|
|||
Access 2007 Runtime - Export Report
Albert kallal has a nice ribbon for using with the runtime. Use this or a
slight variation on this to get the exporting options on the ribbon. If you are using Sage installer they actually had a bug that I uncovered for them with exporting from reports so make sure you have a recent version. http://www.members.shaw.ca/AlbertKal...s/DownLoad.htm Hope this helps, Mark Andrews RPT Software http://www.rptsoftware.com http://www.donationmanagementsoftware.com "ggregg" wrote in message ... I would like to be able to export reports from an Access 2007 program in runtime. The Report Preview Ribbon doesn't have the Export group on it. I created a custom Ribbon and it worked fine until I ran the program in runtime mode. The Export tab was blank again. I have tried using TransferSpreadsheet, but I have many reports that the user chooses filters for and I open the report with a 'Where' clause. The TransferSpreadsheet only transfers the underlying query, not with the filters. The Export Button works perfectly for this but is missing in the runtime. Is there a way to filter Data in TransferSpreadsheet, or a way to put the Export button on a Ribbon in a runtime? |
#3
|
|||
|
|||
Access 2007 Runtime - Export Report
Thank you so much for this information.
I downloaded the Ribbon example db. Then I copied the xml to my USysRibbon table. I included this ribbon name on the report properties. When I open the report using the runtime, the Export buttons come up which is exactly what I wanted. But when I click on the 'Export to Excel' button I get a message: "The expression you entered has a function name that Microsoft Access can't find" I don't know where to start looking for the error. My report exports fine when I'm not using the runtime, and I tried Mr. Kallal's report on his example db and it worked fine. Any ideas? |
#4
|
|||
|
|||
Access 2007 Runtime - Export Report
Did you put the code in? There is a little bit of VBA code that goes with
those buttons. It's probably in the basRibbonCallbacks module. I think this is the code: Public Function MyExport(strFormat As String) Dim strFileType As String Dim strFileFilter As String Dim strFilename As String Select Case strFormat Case "RTF" ' word strFileType = acFormatRTF strFileFilter = "*.rtf" Case "XLS" ' excel strFileType = acFormatXLS strFileFilter = "*.XLS" Case "TXT" ' text strFileType = acFormatTXT strFileFilter = "*.txt" Case "HTML" strFileType = acFormatHTML strFileFilter = "*.html" Case "PDF" strFileType = acFormatPDF strFileFilter = "*.pdf" Case Else Exit Function End Select strFilename = SaveFileName(strFileType, strFileType, strFileFilter) If strFilename "" Then DoCmd.OutputTo acOutputReport, Screen.ActiveReport.Name, strFileType, strFilename End If End Function Public Function SaveFileName(strTitle As String, strFilterText As String, strFilter As String) As String strFilter = ahtAddFilterItem(strFilter, strFilterText, strFilter) SaveFileName = ahtCommonFileOpenSave( _ OpenFile:=False, _ Filter:=strFilter, _ DialogTitle:=strTitle, _ Flags:=ahtOFN_OVERWRITEPROMPT Or ahtOFN_READONLY) End Function "ggregg" wrote in message ... Thank you so much for this information. I downloaded the Ribbon example db. Then I copied the xml to my USysRibbon table. I included this ribbon name on the report properties. When I open the report using the runtime, the Export buttons come up which is exactly what I wanted. But when I click on the 'Export to Excel' button I get a message: "The expression you entered has a function name that Microsoft Access can't find" I don't know where to start looking for the error. My report exports fine when I'm not using the runtime, and I tried Mr. Kallal's report on his example db and it worked fine. Any ideas? |
#5
|
|||
|
|||
Access 2007 Runtime - Export Report
That was the problem and it works now.
Thanks so much for your help |
Thread Tools | |
Display Modes | |
|
|