Problem accessing Report.

forum.centura.team.developer (2000-2005) & forum.sqlwindows (2000-2005)
NewsgroupServer
Robot
Robot
Posts: 116488
Joined: 24 Feb 2017, 12:00
Location: World wide

Problem accessing Report.

Post by NewsgroupServer » 07 Mar 2005, 16:27

 Posted by:  Raj 

Hello All,

I have a Purchase Order application that sends out outlook emails to various
managers for their approval.Once the email is sent and immediately try to
open a report from the application, I get an error 'Cannnot open report
xxxxx.qrp'. But when I logout of the application and login back and
immediately access the report it works. Is there any function that I need to
refresh immediately after sending the emails.

Any advice or suggestions in this regard is highly appreciated. Thanks in
advance.

Raj.

NewsgroupServer
Robot
Robot
Posts: 116488
Joined: 24 Feb 2017, 12:00
Location: World wide

Problem accessing Report.

Post by NewsgroupServer » 07 Mar 2005, 16:32

 Posted by:  Aravind Ram 

Do you provide the whole path to the QRP in the SalReportView function or
only the name of the QRP (for ex: ..\myreport.qrp). Do you change
directories in your program before invoking outlook? If so, resetting it
back may help.

Aravind

NewsgroupServer
Robot
Robot
Posts: 116488
Joined: 24 Feb 2017, 12:00
Location: World wide

Problem accessing Report.

Post by NewsgroupServer » 07 Mar 2005, 16:47

 Posted by:  Rainer Ebert 

If relative paths are used: There are functions which implicitly change the
working directory. E.g. sending an email changes the working directory. Or
using the SalDlgFileOpen()-function does change the wd.

Rainer

NewsgroupServer
Robot
Robot
Posts: 116488
Joined: 24 Feb 2017, 12:00
Location: World wide

Problem accessing Report.

Post by NewsgroupServer » 07 Mar 2005, 19:20

 Posted by:  Raj 

Thanks Aravind.

I do not give the full path of the QRP in the SalReportView function. I just
give for example 'Test.qrp'. I do not change directories before invoking
outlook.

Raj.

NewsgroupServer
Robot
Robot
Posts: 116488
Joined: 24 Feb 2017, 12:00
Location: World wide

Problem accessing Report.

Post by NewsgroupServer » 07 Mar 2005, 19:44

 Posted by:  Aravind Ram 

It may be that invoking Outlook (as mentioned by Rainer) is changing your
working directory. So try this, get the current directory before invoking
outlook and check this value after outlook is invoked. If they are
different, then set the current directory back to the original value. See
SalFileGetCurrentDirectory and SalFileSetCurrentDirectory.

Aravind

NewsgroupServer
Robot
Robot
Posts: 116488
Joined: 24 Feb 2017, 12:00
Location: World wide

Problem accessing Report.

Post by NewsgroupServer » 07 Mar 2005, 22:40

 Posted by:  Alberto Aviles \(mx\) 

hi...

i have the same problem, when i print it with a pdfwriter... i can't
solve, but i think "XXXX.QRP" is open because the external aplication don't
say " I finish, then close the file" the real truble is that one pointer or
i don't know what, is handling the file, then maybe the solution is chatch
the filehandler and close whit the aplication in gupta

NewsgroupServer
Robot
Robot
Posts: 116488
Joined: 24 Feb 2017, 12:00
Location: World wide

Problem accessing Report.

Post by NewsgroupServer » 08 Mar 2005, 09:51

 Posted by:  Rainer Ebert 

In TD 1.5.0 sending an email did not change the working directory.
In TD 2.1 and above, sending an email changes the working directory.
I had a similiar problem.

Rainer

NewsgroupServer
Robot
Robot
Posts: 116488
Joined: 24 Feb 2017, 12:00
Location: World wide

Problem accessing Report.

Post by NewsgroupServer » 09 Mar 2005, 19:48

 Posted by:  Abdul M. Babatunde TAHIR-AKINYELE 

Hi Rainer,

Am new to this forum, and was just reading your comments, this brought to my
attention a problem am having with our application. The database and
application sit on the server, and we have mapped a drive to the application
from the client workstation, if you print a report on the server it prints
ok, but when trying to print from the client workstation it reports an error
that the report could not be found, some of the client workstation has their
own printer attached to their machine running windows XP professionals, our
application uses CTD v.1.1.2, client workstation with Window 2000
professionals work ok.

Please could you make any suggestions.

Thanks.

--

Abdul M.B TAHIR-AKINYELE
TAI-KINSoft (W.A) Ltd.
DL: +233.21.783140
Cell: +233.244.520013
www.taikinsoft.com

NewsgroupServer
Robot
Robot
Posts: 116488
Joined: 24 Feb 2017, 12:00
Location: World wide

Problem accessing Report.

Post by NewsgroupServer » 09 Mar 2005, 21:06

 Posted by:  Jason Veniot 

Hello,

I'm going to take a very big guess at your problem.

Do you have the path included included as part of the report template name
in your call to SalReportPrint()? If not, then the application will look
for the report template name in the currently active directory on the client
computer, then in the directory on the client where the Run-Time is
installed.

If this is indeed the situation, then either hard-code the path to the
report template in your application, or get the path to the template at
run-time dynamically. For example:

Call VisDosSplitPath( strArgArray[0], sDrive, sDir, sBase, sExt)
Set sApplicationPath = sDrive || sDir
Set sReportName = sApplicationPath || sReportName

Hope that helps.
Best regards.

NewsgroupServer
Robot
Robot
Posts: 116488
Joined: 24 Feb 2017, 12:00
Location: World wide

Problem accessing Report.

Post by NewsgroupServer » 10 Mar 2005, 05:56

 Posted by:  Abdul M. Babatunde TAHIR-AKINYELE 

Thanks Jason, will look into that and get back to you later. thanks a lot.

--

Abdul M.B TAHIR-AKINYELE
TAI-KINSoft (W.A) Ltd.
DL: +233.21.783140
Cell: +233.244.520013
www.taikinsoft.com

Return to “forum.sqlwindows”

Who is online

Users browsing this forum: [Ccbot] and 0 guests