J
Jama
I have access application AddressDB.adp containing access reports among
other things. I want to run the report viewer without showing the access
application UI.
I am using C# and MS access and I call the Run_Access Method bellow to open
the acces application. I set the
access.Visible = false; but still I get the Access UI opening and that
happens when I call OpenCurrentDatabase or OpenAccessProject. How can I
prevent access UI showing?
private void Run_Access_Report(string reportName)
{
Access.Application access = null;
try
{
access = new Access.ApplicationClass();
access.Visible = false; //open access in the background
string databasePath = Path.Combine(DB_PATH, "AddressDb.adp");
// using Access 10.0 object library
access.OpenCurrentDatabase(databasePath, false, null);
RunReport(Access, reportName)
}
finally
{
if (!access.UserControl) access.UserControl = true;
DisposeAutomation(access);
access = null;
}
}
The code above works but fist it opens MS Access and then it shows the
report. I would like to see only the report viewer.
Thanks
other things. I want to run the report viewer without showing the access
application UI.
I am using C# and MS access and I call the Run_Access Method bellow to open
the acces application. I set the
access.Visible = false; but still I get the Access UI opening and that
happens when I call OpenCurrentDatabase or OpenAccessProject. How can I
prevent access UI showing?
private void Run_Access_Report(string reportName)
{
Access.Application access = null;
try
{
access = new Access.ApplicationClass();
access.Visible = false; //open access in the background
string databasePath = Path.Combine(DB_PATH, "AddressDb.adp");
// using Access 10.0 object library
access.OpenCurrentDatabase(databasePath, false, null);
RunReport(Access, reportName)
}
finally
{
if (!access.UserControl) access.UserControl = true;
DisposeAutomation(access);
access = null;
}
}
The code above works but fist it opens MS Access and then it shows the
report. I would like to see only the report viewer.
Thanks