Showing posts with label bit. Show all posts
Showing posts with label bit. Show all posts

Sunday, March 11, 2012

drop last bit

Hi,

I have an sql script, which updates some values by using BIT operations..

ex:

UPDATE table1

SET myValue = myValue & ~mask | (availability - mask)...

Problem is, this returns a value, when written to binary, it's one bit too long!

ex:

0 1 1 1 1 1

(= 62)

which should be:

0 1 1 1 1 0

(=31)

How can I "drop" this last BIT?

(Keep in mind that I store these values as LONGINT's)...

Been fighting with this one all day..

Try this...

Code Snippet

select cast(substring(rtrim(convert(char(19),<columnName>)),1,len(rtrim(convert(char(19),<columnName>)))-1) as bigint)

Sunday, February 26, 2012

Driver Install Location

I have read most of the documentation on installing the JDBC driver and need
a bit of clarification on what and where files gets installed.
First: Am I correct to assume that installation takes place on the client
machine and than NO files are actually installed on the server hosting SQL
Server?
Second: If the JRE is installed on the client, is it only the class jars,
msutil.jar, mssqlserver.jar, msbase.jar that are responsible for enabling the
JDBC connection.
Kind regards for any reply
| Thread-Topic: Driver Install Location
| thread-index: AcS7ky47eyc/czQMQSKYX1iOSRQzOQ==
| X-WBNR-Posting-Host: 24.169.110.115
| From: "=?Utf-8?B?Q2hyaXM=?=" <Chris@.discussions.microsoft.com>
| Subject: Driver Install Location
| Date: Tue, 26 Oct 2004 12:37:08 -0700
| Lines: 12
| Message-ID: <E20ADC31-1528-4F55-8A5A-C3FE05250257@.microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.jdbcdriver
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.jdbcdriver:6425
| X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
|
| I have read most of the documentation on installing the JDBC driver and
need
| a bit of clarification on what and where files gets installed.
|
| First: Am I correct to assume that installation takes place on the client
| machine and than NO files are actually installed on the server hosting
SQL
| Server?
|
| Second: If the JRE is installed on the client, is it only the class jars,
| msutil.jar, mssqlserver.jar, msbase.jar that are responsible for enabling
the
| JDBC connection.
|
| Kind regards for any reply
|
Hello,
The Microsoft JDBC driver is a client installation. You will need to add
the three .jar files to your CLASSPATH on the client machine as well. If
you are using an application server, then the .jar files will need to be
installed on this machine. The installation location and CLASSPATH
configuration steps vary depending on the app server you are using.
The only server component that you may need is the sqljdbc.dll file, which
enables JTA support (transactions). If your application will require this,
then you will need to copy this file from C:\program files\Microsoft SQL
Server 2000 Driver for JDBC\SQLServer JTA\ (or C:\program files\Microsoft
SQL Server 2000 Driver for JDBC\SQLServer JTA 64-bit\ in the case of 64-bit
machines) into the C:\program files\Microsoft SQL Server\MSSQL\Binn\
directory of your SQL Server 2000 installation. Then, you must run the
instjdbc.sql script from C:\program files\Microsoft SQL Server 2000 Driver
for JDBC\SQLServer JTA\ to install the extended stored procedures. You can
use Query Analyzer or osql.exe to run the script.
The JDBC documentation (.pdf) describes the CLASSPATH configuration and JTA
installation in more detail. Look for the following topics:
"Setting the CLASSPATH"
"Installing Stored Procedures for JTA"
Carb Simien, MCSE MCDBA MCAD
Microsoft Developer Support - Web Data
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.

Friday, February 24, 2012

Drillthrough with multiple tables

Hi,

I'm having a bit of trouble with drillthrough, hope someone can help.

When the user drills through, I would like them to retrieve some records that are located in another table - not in the fact table.

E.g. if they drill down on one record of with a data value of 100, they should see 4 related source records that reside in another table.

At the moment, when the user drills down, they always see the entire contents of the other table. Of course it should only show you the records that apply to the value you're drilling on.

I've tried several things, setting up a relationship in the cube schema, and setting up a relationship in SQL Server between the two tables. Either way I always get the whole table back.

Can anyone help

Thanks
Jeremy

If you're talking about SQL Server 2005, then see the MSDN whitepaper http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql90/html/sql2k5_anservdrill.asp. It has an example of drillthrough to an alternate fact table.

If this is SQL Server 2000, you can troubleshoot by running Profiler and capturing the drillthrough SQL query issued by Analysis Services. Maybe its not joining the alternate table with the fact table. Try including a drillthrough column from the fact table as well.

Tuesday, February 14, 2012

Drill down using url access in ASP.net not working

I've been through a good bit of the message boards trying to find an
answer to this problem.
I have an application that uses an iframe to embed a MSRS report. I'm
using URL access to call the report.
The problem is that any drill downs in the report DO NOT actually
expand anything in the report. I've looked at the rc:ReplacementRoot
in some threads but I don't see any differences with that extra
parameter.
Has anyone gotten a drilldown to work on an embedded report?
FYI, I've tryied using the sample ReportViewer sample application as
well and I have the same problem:drill downs don't work. (Makes sense
since the ReportViewer sample just creates an iframe.)
Tested with both MSRS with and without service pack 1.
Thanks,
Eugene KolovyanskyPlease take a look at Report Manager, which is part of the package. Report
Manager is a separate ASP.NET application, just like yours. It uses SOAP
calls to the server for management but it uses URL access and IFrame to
render reports. See if drill down works in ReportManager. If it does, you
should be able to do it the same way. If not, we can investigate this
problem.
--
Dmitry Vasilevsky, SQL Server Reporting Services Developer
This posting is provided "AS IS" with no warranties, and confers no rights.
--
---
"Euge" <yevger@.yahoo.com> wrote in message
news:3f8e8a3d.0407281450.34ad533c@.posting.google.com...
> I've been through a good bit of the message boards trying to find an
> answer to this problem.
> I have an application that uses an iframe to embed a MSRS report. I'm
> using URL access to call the report.
> The problem is that any drill downs in the report DO NOT actually
> expand anything in the report. I've looked at the rc:ReplacementRoot
> in some threads but I don't see any differences with that extra
> parameter.
> Has anyone gotten a drilldown to work on an embedded report?
> FYI, I've tryied using the sample ReportViewer sample application as
> well and I have the same problem:drill downs don't work. (Makes sense
> since the ReportViewer sample just creates an iframe.)
> Tested with both MSRS with and without service pack 1.
> Thanks,
> Eugene Kolovyansky|||Thanks for the quick response.
I've looked a little at how the Report Manager handles reports. Drill
downs work just fine there. I've noticed a strange issue with drill
downs and images while pursuing this.
Let's say I have a page with two frames.Menu frame points all links to
the main frame. If I have a single link that opens the report into the
main frame , the drill downs do not work and all images are broken.
If I then change the links to open to a new window (calling the URL
access directly), the reports render fine with drilldowns and images.
If I then point the links back to the frames, the reports render just
fine (drill down and all).
Here's the kicker..the drilldowns are expanded to the same positions I
used when I opened it to a new window.
That makes me think that there may be some session action setup by the
reportserver going on that I'm missing. When I close the browser, I
have to start that process over again.
Any thoughts?
Eugene Kolovyansky
"Dmitry Vasilevsky [MSFT]" <dmvasi@.microsoft.com> wrote in message news:<#88SaVRdEHA.1048@.tk2msftngp13.phx.gbl>...
> Please take a look at Report Manager, which is part of the package. Report
> Manager is a separate ASP.NET application, just like yours. It uses SOAP
> calls to the server for management but it uses URL access and IFrame to
> render reports. See if drill down works in ReportManager. If it does, you
> should be able to do it the same way. If not, we can investigate this
> problem.
> --
> Dmitry Vasilevsky, SQL Server Reporting Services Developer
> This posting is provided "AS IS" with no warranties, and confers no rights.
> --
> ---
> "Euge" <yevger@.yahoo.com> wrote in message
> news:3f8e8a3d.0407281450.34ad533c@.posting.google.com...
> > I've been through a good bit of the message boards trying to find an
> > answer to this problem.
> > I have an application that uses an iframe to embed a MSRS report. I'm
> > using URL access to call the report.
> > The problem is that any drill downs in the report DO NOT actually
> > expand anything in the report. I've looked at the rc:ReplacementRoot
> > in some threads but I don't see any differences with that extra
> > parameter.
> > Has anyone gotten a drilldown to work on an embedded report?
> >
> > FYI, I've tryied using the sample ReportViewer sample application as
> > well and I have the same problem:drill downs don't work. (Makes sense
> > since the ReportViewer sample just creates an iframe.)
> > Tested with both MSRS with and without service pack 1.
> >
> > Thanks,
> > Eugene Kolovyansky|||I found a way to get the reports to work with drilldowns and all. I
provide a sessionid to the report via rs:SessionId=<anything> with the
URL access url for the report. (as long as <anything> is
alpha-numeric)
I'm looking into sessions in reporting services to see what, if
anything, I would break by doing this.
Eugene Kolovyansky
yevger@.yahoo.com (Euge) wrote in message news:<3f8e8a3d.0407291200.2e9939ab@.posting.google.com>...
> Thanks for the quick response.
> I've looked a little at how the Report Manager handles reports. Drill
> downs work just fine there. I've noticed a strange issue with drill
> downs and images while pursuing this.
> Let's say I have a page with two frames.Menu frame points all links to
> the main frame. If I have a single link that opens the report into the
> main frame , the drill downs do not work and all images are broken.
> If I then change the links to open to a new window (calling the URL
> access directly), the reports render fine with drilldowns and images.
> If I then point the links back to the frames, the reports render just
> fine (drill down and all).
> Here's the kicker..the drilldowns are expanded to the same positions I
> used when I opened it to a new window.
> That makes me think that there may be some session action setup by the
> reportserver going on that I'm missing. When I close the browser, I
> have to start that process over again.
> Any thoughts?
> Eugene Kolovyansky
> "Dmitry Vasilevsky [MSFT]" <dmvasi@.microsoft.com> wrote in message news:<#88SaVRdEHA.1048@.tk2msftngp13.phx.gbl>...
> > Please take a look at Report Manager, which is part of the package. Report
> > Manager is a separate ASP.NET application, just like yours. It uses SOAP
> > calls to the server for management but it uses URL access and IFrame to
> > render reports. See if drill down works in ReportManager. If it does, you
> > should be able to do it the same way. If not, we can investigate this
> > problem.
> >
> > --
> > Dmitry Vasilevsky, SQL Server Reporting Services Developer
> > This posting is provided "AS IS" with no warranties, and confers no rights.
> > --
> >
> > ---
> > "Euge" <yevger@.yahoo.com> wrote in message
> > news:3f8e8a3d.0407281450.34ad533c@.posting.google.com...
> > > I've been through a good bit of the message boards trying to find an
> > > answer to this problem.
> > > I have an application that uses an iframe to embed a MSRS report. I'm
> > > using URL access to call the report.
> > > The problem is that any drill downs in the report DO NOT actually
> > > expand anything in the report. I've looked at the rc:ReplacementRoot
> > > in some threads but I don't see any differences with that extra
> > > parameter.
> > > Has anyone gotten a drilldown to work on an embedded report?
> > >
> > > FYI, I've tryied using the sample ReportViewer sample application as
> > > well and I have the same problem:drill downs don't work. (Makes sense
> > > since the ReportViewer sample just creates an iframe.)
> > > Tested with both MSRS with and without service pack 1.
> > >
> > > Thanks,
> > > Eugene Kolovyansky|||Drill downs as well as images depend on sessions to work properly. Session
ID is stored in a cookie and set when you first run the report (or press
Ctrl+F5). If your cookies are not shared across frames you get different
sessions.
Providing session ID on the URL forces server to use cookieless sessions.
Session ID that you provide on URL is not present on the server, so server
starts a new session. Since it is a cookieless session, server redirects you
to the new URL with correct session ID (instead of just setting cookie).
Hope this explains the behavior you are seeing.
--
Dmitry Vasilevsky, SQL Server Reporting Services Developer
This posting is provided "AS IS" with no warranties, and confers no rights.
--
---
"Euge" <yevger@.yahoo.com> wrote in message
news:3f8e8a3d.0408020626.3b640531@.posting.google.com...
> I found a way to get the reports to work with drilldowns and all. I
> provide a sessionid to the report via rs:SessionId=<anything> with the
> URL access url for the report. (as long as <anything> is
> alpha-numeric)
> I'm looking into sessions in reporting services to see what, if
> anything, I would break by doing this.
> Eugene Kolovyansky
> yevger@.yahoo.com (Euge) wrote in message
news:<3f8e8a3d.0407291200.2e9939ab@.posting.google.com>...
> > Thanks for the quick response.
> > I've looked a little at how the Report Manager handles reports. Drill
> > downs work just fine there. I've noticed a strange issue with drill
> > downs and images while pursuing this.
> >
> > Let's say I have a page with two frames.Menu frame points all links to
> > the main frame. If I have a single link that opens the report into the
> > main frame , the drill downs do not work and all images are broken.
> >
> > If I then change the links to open to a new window (calling the URL
> > access directly), the reports render fine with drilldowns and images.
> > If I then point the links back to the frames, the reports render just
> > fine (drill down and all).
> > Here's the kicker..the drilldowns are expanded to the same positions I
> > used when I opened it to a new window.
> >
> > That makes me think that there may be some session action setup by the
> > reportserver going on that I'm missing. When I close the browser, I
> > have to start that process over again.
> >
> > Any thoughts?
> > Eugene Kolovyansky
> >
> > "Dmitry Vasilevsky [MSFT]" <dmvasi@.microsoft.com> wrote in message
news:<#88SaVRdEHA.1048@.tk2msftngp13.phx.gbl>...
> > > Please take a look at Report Manager, which is part of the package.
Report
> > > Manager is a separate ASP.NET application, just like yours. It uses
SOAP
> > > calls to the server for management but it uses URL access and IFrame
to
> > > render reports. See if drill down works in ReportManager. If it does,
you
> > > should be able to do it the same way. If not, we can investigate this
> > > problem.
> > >
> > > --
> > > Dmitry Vasilevsky, SQL Server Reporting Services Developer
> > > This posting is provided "AS IS" with no warranties, and confers no
rights.
> > > --
> > >
> > > ---
> > > "Euge" <yevger@.yahoo.com> wrote in message
> > > news:3f8e8a3d.0407281450.34ad533c@.posting.google.com...
> > > > I've been through a good bit of the message boards trying to find an
> > > > answer to this problem.
> > > > I have an application that uses an iframe to embed a MSRS report.
I'm
> > > > using URL access to call the report.
> > > > The problem is that any drill downs in the report DO NOT actually
> > > > expand anything in the report. I've looked at the rc:ReplacementRoot
> > > > in some threads but I don't see any differences with that extra
> > > > parameter.
> > > > Has anyone gotten a drilldown to work on an embedded report?
> > > >
> > > > FYI, I've tryied using the sample ReportViewer sample application as
> > > > well and I have the same problem:drill downs don't work. (Makes
sense
> > > > since the ReportViewer sample just creates an iframe.)
> > > > Tested with both MSRS with and without service pack 1.
> > > >
> > > > Thanks,
> > > > Eugene Kolovyansky|||Hi Eugene,
Did u happen to find find any problems with stating the sessionid=<anything>
Thanks
"Euge" wrote:
> I found a way to get the reports to work with drilldowns and all. I
> provide a sessionid to the report via rs:SessionId=<anything> with the
> URL access url for the report. (as long as <anything> is
> alpha-numeric)
> I'm looking into sessions in reporting services to see what, if
> anything, I would break by doing this.
> Eugene Kolovyansky
> yevger@.yahoo.com (Euge) wrote in message news:<3f8e8a3d.0407291200.2e9939ab@.posting.google.com>...
> > Thanks for the quick response.
> > I've looked a little at how the Report Manager handles reports. Drill
> > downs work just fine there. I've noticed a strange issue with drill
> > downs and images while pursuing this.
> >
> > Let's say I have a page with two frames.Menu frame points all links to
> > the main frame. If I have a single link that opens the report into the
> > main frame , the drill downs do not work and all images are broken.
> >
> > If I then change the links to open to a new window (calling the URL
> > access directly), the reports render fine with drilldowns and images.
> > If I then point the links back to the frames, the reports render just
> > fine (drill down and all).
> > Here's the kicker..the drilldowns are expanded to the same positions I
> > used when I opened it to a new window.
> >
> > That makes me think that there may be some session action setup by the
> > reportserver going on that I'm missing. When I close the browser, I
> > have to start that process over again.
> >
> > Any thoughts?
> > Eugene Kolovyansky
> >
> > "Dmitry Vasilevsky [MSFT]" <dmvasi@.microsoft.com> wrote in message news:<#88SaVRdEHA.1048@.tk2msftngp13.phx.gbl>...
> > > Please take a look at Report Manager, which is part of the package. Report
> > > Manager is a separate ASP.NET application, just like yours. It uses SOAP
> > > calls to the server for management but it uses URL access and IFrame to
> > > render reports. See if drill down works in ReportManager. If it does, you
> > > should be able to do it the same way. If not, we can investigate this
> > > problem.
> > >
> > > --
> > > Dmitry Vasilevsky, SQL Server Reporting Services Developer
> > > This posting is provided "AS IS" with no warranties, and confers no rights.
> > > --
> > >
> > > ---
> > > "Euge" <yevger@.yahoo.com> wrote in message
> > > news:3f8e8a3d.0407281450.34ad533c@.posting.google.com...
> > > > I've been through a good bit of the message boards trying to find an
> > > > answer to this problem.
> > > > I have an application that uses an iframe to embed a MSRS report. I'm
> > > > using URL access to call the report.
> > > > The problem is that any drill downs in the report DO NOT actually
> > > > expand anything in the report. I've looked at the rc:ReplacementRoot
> > > > in some threads but I don't see any differences with that extra
> > > > parameter.
> > > > Has anyone gotten a drilldown to work on an embedded report?
> > > >
> > > > FYI, I've tryied using the sample ReportViewer sample application as
> > > > well and I have the same problem:drill downs don't work. (Makes sense
> > > > since the ReportViewer sample just creates an iframe.)
> > > > Tested with both MSRS with and without service pack 1.
> > > >
> > > > Thanks,
> > > > Eugene Kolovyansky
>