aminaalavi
Programmer
Hi,
I gave created a number of dialog boxes. The buttons lead to various reports. In impromptu, i have set the preferences for file locations to where my files are. If i directly open the report without first opening the catalog with the "object.openreport " command, i am able to open the catalog. With this the catalog dialog box ( with username and PW ) opens up. If i click on cancel, it dissapears for a second and pops again until i keep clicking it and finally after 3-4 times i get an error message. For that reason i tried the "object.opencatalog " command to open the catalog first. It worked perfectly. HOwever, i do not know where the users will place there reports and catalogs so with the "object.opencatalog " command i cannot put in the path name but only the name of the catalog and the report. The users will set their file paths in the preferences of impromptu. This was fine with just the "object.openreport " command ( only the name and no path) but when i put in the object.opencatalog command ( with only the name and no path) it says that it could not locate the catalog; even though the preferences are set to the correct file locations.
Please let me know what i can do. Given below is a sample of my code:
Dim ImpApp2 As object
Set ImpApp2 = CreateObject("CognosImpromptu.Application"
ImpApp2.Visible 1
ImpApp2.Opencatalog "catalog.cat"
ImpApp2.OpenReport("report.imr"
ImpApp2.WindowState = 1
call tvlshowdlg
ImpApp2.activate
ImpApp2.Quit
Set ImpApp2 = Nothing
Thanks
Amina
I gave created a number of dialog boxes. The buttons lead to various reports. In impromptu, i have set the preferences for file locations to where my files are. If i directly open the report without first opening the catalog with the "object.openreport " command, i am able to open the catalog. With this the catalog dialog box ( with username and PW ) opens up. If i click on cancel, it dissapears for a second and pops again until i keep clicking it and finally after 3-4 times i get an error message. For that reason i tried the "object.opencatalog " command to open the catalog first. It worked perfectly. HOwever, i do not know where the users will place there reports and catalogs so with the "object.opencatalog " command i cannot put in the path name but only the name of the catalog and the report. The users will set their file paths in the preferences of impromptu. This was fine with just the "object.openreport " command ( only the name and no path) but when i put in the object.opencatalog command ( with only the name and no path) it says that it could not locate the catalog; even though the preferences are set to the correct file locations.
Please let me know what i can do. Given below is a sample of my code:
Dim ImpApp2 As object
Set ImpApp2 = CreateObject("CognosImpromptu.Application"
ImpApp2.Visible 1
ImpApp2.Opencatalog "catalog.cat"
ImpApp2.OpenReport("report.imr"
ImpApp2.WindowState = 1
call tvlshowdlg
ImpApp2.activate
ImpApp2.Quit
Set ImpApp2 = Nothing
Thanks
Amina