Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / February 2008

Tip: Looking for answers? Try searching our database.

CITRIX Problem Error 2046 ReportToPDF

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Peter Martin - 30 Jan 2008 18:55 GMT
I'm using Acc 03 on a Citrix farm and Mr. Lebans excellent ReportToPDF.  With
the database window visible the PDF gets created fine: with it hidden it
fails with Error 2046

"The command or action '|' isn't available now.@* You may be in a read-only
database or an unconverted database from an earlier version of Maintenance
Schedules.
* The type of object the action applies to isn't currently selected or isn't
in the active view.@Use only those commands and macro actions that are
currently available for this database.@1@@1"

In other words, it looks exactly like:
BUG: Error Message 2046 Calling OpenForm or OpenReport with Access Automation
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q244695

except I'm not running Acc 2000 & I'm not using automation.

It fails in the modReportToPDF.ConvertToPDF function on the line
DoCmd.OutputTo acOutputReport, RptName, "SnapshotFormat(*.snp)",
strPathandFileName

I initially thought it was Citrix intercepting the GetTempPathA call (our
"application isolation level" is cranked to the max, I think, for whatever
reason).  
On the desktop GetTempPathA returns C:\DOCUME~1\...\LOCALS~1\Temp\,
On Citrix it returns a unique path for each session:  i.e. one session will
return X:\DOCUME~1\...\LOCALS~1\Temp\15\, another simultaneous session will
return X:\DOCUME~1\...\LOCALS~1\Temp\2e\  etc.
The folders are unique to that session and not even visible to other
sessions.   Files created in X:\DOCUME~1\...\LOCALS~1\Temp are not visible in
other simultaneous sessions either.
However, I replaced the call to GetTempPath with CurrentDBDir() and it still
fails.  (no problems with files here).

Can anyone schooled in the dark, riddled mysteries of Citrix help out please?

PS: Citrix Program Neighbourhood (v 9.200.44376)
maria-hominem - 30 Jan 2008 20:36 GMT
> I'm using Acc 03 on a Citrix farm and Mr. Lebans excellent ReportToPDF.
> With
[quoted text clipped - 42 lines]
>
> PS: Citrix Program Neighbourhood (v 9.200.44376)
Peter Martin - 27 Feb 2008 19:54 GMT
FYI, the following worked:  wrapped modReportToPDF.ConvertReportToPDF
OutputTo statement with call to display & minimize, then hide, the database
window.

modReportToPDF.ConvertReportToPDF
...
   DoCmd.SelectObject acReport, , True  'required for Citrix
   DoCmd.Minimize   'required for Citrix
   DoCmd.OutputTo acOutputReport, RptName, "SnapshotFormat(*.snp)",
strPathandFileName
   Application.RunCommand acCmdWindowHide  'required for Citrix


Causes acceptable amount of visual disruption to the user.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.