Showing posts with label screen. Show all posts
Showing posts with label screen. Show all posts

Sunday, March 11, 2012

"object does not support this property or method" when trying to print

I have a user that gets the error at the bottom of the screen that states "object does not support this property or method " whenever they lcik on the print button. I have run the same report and do not received the error. Does anyone know how to fix this?

They may have an old version of the print control. They should open the Tools menu in IE, go to Internet Options ->settings ->view objects and then delete the RSClientPrint class. Clicking the print icon should download a new control that should work for them.

-Daniel

Tuesday, March 6, 2012

"dynamical" view

Hi,

I'm currently migrating an MS Access database to SQL 2000 Standard, and i have a problem with queries migration.

In acccess, a screen allows me to view some informations depending on Criteria, and results are returned with a query (we'll call it Q1).

Then, when correct data are returned by the query Q1, some other queries compute sums, average, group by orders, based on Q1's results.

Now my question : as in sql server, a view cannot accept parameters, the solution i adopted is :

- create a generic Q1 view, not filtered.

- then, all the subqueries based on this view are Functions or Stored procedures, which accepts parameters and do the filter on the main view (Q1).

The problem is that writing such functions or stored procedures is quite long, and interface code has to be deeply modified to use these parameters.

First, I had the idea of creating a temporary table, in which i would have inserted the good data, an the other queries would have used it. Unfortunately, views can't use temporary tables.

Any good idea is expected. Thanks in advance,

So, i found a first way to do this, maybe not the best, but it seems to work correctly.

I generate the script to dynamically generate the view with the correct "where" statements.

The view's name is MyView_ + Host_Id().

It should work since we don't use a citrix server for client hosting...