A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Access 2007 Runtime - Export Report



 
 
Thread Tools Display Modes
  #1  
Old March 24th, 2010, 08:34 PM posted to microsoft.public.access
ggregg
external usenet poster
 
Posts: 43
Default 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  
Old March 24th, 2010, 10:36 PM posted to microsoft.public.access
Mark Andrews[_4_]
external usenet poster
 
Posts: 169
Default 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  
Old March 25th, 2010, 01:22 AM posted to microsoft.public.access
ggregg
external usenet poster
 
Posts: 43
Default 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  
Old March 25th, 2010, 12:39 PM posted to microsoft.public.access
Mark Andrews[_4_]
external usenet poster
 
Posts: 169
Default 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  
Old March 25th, 2010, 03:45 PM posted to microsoft.public.access
ggregg
external usenet poster
 
Posts: 43
Default Access 2007 Runtime - Export Report

That was the problem and it works now.
Thanks so much for your help
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:42 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.