Thursday, March 29, 2012

Cristal Reports for OLAP CUBE

I have created a crystal report connecting an OLAP cube .But once i
try to view a report it took around 15 minutes and finaly gave an
error like "cannot retrieve data from cube".I want to know why it is
and how can i create a crystal report for OLAP CUB."Pradeep" <aprpradeep@.hotmail.com> wrote in message
news:3f64305f.0402250014.39e80bee@.posting.google.c om...
> I have created a crystal report connecting an OLAP cube .But once i
> try to view a report it took around 15 minutes and finaly gave an
> error like "cannot retrieve data from cube".I want to know why it is
> and how can i create a crystal report for OLAP CUB.

It sounds more like a Crystal Reports question than an MSSQL one, but you
may want to try posting in microsoft.public.sqlserver.olap, to see if anyone
there has experience of this.

Simon|||"Pradeep" <aprpradeep@.hotmail.com> wrote in message
news:3f64305f.0402250014.39e80bee@.posting.google.c om...
> I have created a crystal report connecting an OLAP cube .But once i
> try to view a report it took around 15 minutes and finaly gave an
> error like "cannot retrieve data from cube".I want to know why it is
> and how can i create a crystal report for OLAP CUB.

You may want to capture a trace using the Profiler tool which should show
you what SELECT statements are being passed from Crystal. See BOL on
Profiler. Once you capture the trace you could then run the SELECT
statement(s) in Query Analyzer which may tell you if you are having an issue
with your reporting tool or if your SELECT statements cause errors or
timeouts.|||"Terri" <Terri@.spamaway.com> wrote in message news:<c1jmk1$33q$1@.reader2.nmix.net>...
> "Pradeep" <aprpradeep@.hotmail.com> wrote in message
> news:3f64305f.0402250014.39e80bee@.posting.google.c om...
> > I have created a crystal report connecting an OLAP cube .But once i
> > try to view a report it took around 15 minutes and finaly gave an
> > error like "cannot retrieve data from cube".I want to know why it is
> > and how can i create a crystal report for OLAP CUB.
> You may want to capture a trace using the Profiler tool which should show
> you what SELECT statements are being passed from Crystal. See BOL on
> Profiler. Once you capture the trace you could then run the SELECT
> statement(s) in Query Analyzer which may tell you if you are having an issue
> with your reporting tool or if your SELECT statements cause errors or
> timeouts.

Profiler probably won't help here - as far as I know, it works with
connections to SQL Server only, not to Analysis Services.

Simon

CRI Designer Adornment class - host WinForms controls?

Hi,

I'm developing a CRI and in design mode I would like to have some controls on my adornment windows. Is there a way to use WinForms controls here instead of redefining the wheels...?

Thomas

Sorry, using Winforms controls in adornments is not supported.

-Albert

|||

So what do you propose for more complicated UIs? The properties dialog as the only solution?

Thomas

|||

That is one possible solution. You don't have much flexibility to dynamically change the appearance of your adornment, but you can intercept mouse movements and clicks. You can create a dialog that is invoked by clicking in the adornment.

-Albert

Cretae a view in one DB with a stored procedure from another DB

Hi,

Ik created an application with visuals basic.NET. This has a
connection string to one database, let's say 'A'. In this database a
stored procedure is called which should execute a string (which is
passed by the) VB tool. This string is a CREATE VIEW statement en this
should be executed in another database let's say 'B'.

I tried this in Transact - SQL

EXEC('USE B;' + Query)

An error occurs : CREATE VIEW should be the first in a batched
statement.

Could anyone help me with this one?

Greetz,
Hennie"Hennie de Nooijer" <hdenooijer@.hotmail.com> wrote in message
news:191115aa.0405240403.724292f@.posting.google.co m...
> Hi,
> Ik created an application with visuals basic.NET. This has a
> connection string to one database, let's say 'A'. In this database a
> stored procedure is called which should execute a string (which is
> passed by the) VB tool. This string is a CREATE VIEW statement en this
> should be executed in another database let's say 'B'.
> I tried this in Transact - SQL
> EXEC('USE B;' + Query)
> An error occurs : CREATE VIEW should be the first in a batched
> statement.
> Could anyone help me with this one?
> Greetz,
> Hennie

You need a GO right before the CREATE VIEW statement, and this won't work in
dynamic SQL. In any case, this isn't really a good way to create a database
object - it would probably be a lot easier for your client application to
connect directly to database B. Or if you really want to do it from SQL,
then why not create the stored procedure in database B and call it from
database A?

It might help if you can explain what you're trying to achieve, and someone
may be able to suggest a better solution, as creating objects dynamically
from a user application can create significant problems with security and
maintenance. But since you didn't say what your goal is, you may have a good
reason for doing this.

Simon

Creditcard Validation script

Does anyone have a T-SQL script or function that validates US creditcard
numbers?
I am not talking about whether the account is current, just whether the
numeric value of the card is valid. Something similar to what one might use
for zip codes or phone numbers.
Right now I have something that looks for 15 or 16 characters in length and
then checks the first digit for the type of card (e.g., 3 = Amex).
However I was hoping that someone who has worked with this issue might give
me some insights into what conventions or standards a credit card number mus
t
comply with in order to be valid.
ThanksOn Sun, 19 Feb 2006 11:12:26 -0800, "Dave" <Dave@.discussions.microsoft.com>
wrote:
in <331D1E4C-2EB2-4ABF-ACC5-08F5D3E5FC2A@.microsoft.com>

>Does anyone have a T-SQL script or function that validates US creditcard
>numbers?
>I am not talking about whether the account is current, just whether the
>numeric value of the card is valid. Something similar to what one might use
>for zip codes or phone numbers.
>Right now I have something that looks for 15 or 16 characters in length and
>then checks the first digit for the type of card (e.g., 3 = Amex).
>However I was hoping that someone who has worked with this issue might give
>me some insights into what conventions or standards a credit card number mu
st
>comply with in order to be valid.
>Thanks
Here's a URL that I took to heart and converted to VBScript for use in my
classic ASP environment:
http://www.sitepoint.com/print/card...ation-class-php
If you want to see the VBScript also, post back and I'll put it up. I felt
that
this covered it well enough that ashamedly I didn't make any efforts to furt
her
validate the facts that the author presented.
Stefan Berglund

credit cards in sql server table

Dear All,
I need to keep credit cardd details in a an SQL server table.
What's the best way to make sure data is secure? Is there any built in encryption that can be used so data is not stored as text?
ThanksLook up encryption in the SQL 2005 BOL. Encryption functions are included in SQL 2005, but will take some reading to master.|||ohh goody, thanks for the info|||hang on, I need this done in version 8. I guess that's a new feature to SQL 2005.

Is there a 3rd party product for this for version 8?

Credit Card Validation

Hi,
I have a bunch of bad credit cards in my database and need a SQL Script to
find out which ones are actually bad. Does any of you have a credit card
validation sql script that I maybe able to use?
Thank you,
ShivaYou will need to contact the issuer to see if accounts have been
closed, but otherwise, you can do a quick check by Googling card
validation rouitnes. Certain four-digit gorups can only be in certain
places for each card type.|||Sorry Celko. Your answer did not help. I checked google before posting this
message here. There is an algorithm to check for valid credit card numbers.
The SQL script for this validation is what I am interested in.
"--CELKO--" <jcelko212@.earthlink.net> wrote in message
news:1146936845.448785.24310@.j73g2000cwa.googlegroups.com...
> You will need to contact the issuer to see if accounts have been
> closed, but otherwise, you can do a quick check by Googling card
> validation rouitnes. Certain four-digit gorups can only be in certain
> places for each card type.
>|||HAHA - A helpful answer from Celko really is expecting a lot, you're
lucky he didn't just complain about your code (though you avoided this
by not posting any).
If you post the algorithm, and your table structures (or the entire DDL
ideally) then perhaps it can be translated into some SQL.|||Though I should add, you didn't give him anything to work with. The
best way to get useful answers is to post what might seem excessive
amounts of detail. the more the better, scrolling down takes no time,
but if you give everyone loads of info on how to create your problem,
then what you want the solution to be, it makes things really easy for
everyone else, and you'll almost certainly get a response.|||On Sat, 6 May 2006 10:20:52 -0700, "Shiva" <arbitsquare@.hotmail.com>
wrote:
in <emBUuFTcGHA.2068@.TK2MSFTNGP02.phx.gbl>

>Hi,
>I have a bunch of bad credit cards in my database and need a SQL Script to
>find out which ones are actually bad. Does any of you have a credit card
>validation sql script that I maybe able to use?
>Thank you,
>Shiva
>
I used the information here to create VBScript to validate credit card
numbers. You should be able to understand this and convert it to
working TSQL fairly easily.
http://www.sitepoint.com/article/ca...ation-class-php
This posting is provided "AS IS" with no warranties and no guarantees either
express or implied.
Stefan Berglund|||Try this:
/*
* DROP PROC val_credit_card_numbers
*/
IF OBJECT_ID('val_credit_card_numbers') IS NOT NULL
BEGIN
DROP PROC val_credit_card_numbers
PRINT '<<< DROPPED PROC val_credit_card_numbers >>>'
END
go
create procedure val_credit_card_numbers
as
begin
/*
Note: The following table must be created and populated prior to
calling this procedure:
create table #credit_card_numbers(
id int not null,
card_no char(20) not null,
valid char(1) not null
)
*/
declare @.digit int
create table #checksum(
id int not null,
digit smallint not null,
value smallint not null
)
create table #checksum_totals(
id int not null,
value smallint not null
)
create unique clustered index i1 on #checksum_totals(id)
-- Assume numbers are invalid unless proven otherwise.
update #credit_card_numbers
set valid = 'N'
if @.@.error <> 0
begin
raiserror 99999 'Error setting #credit_card_numbers.valid to N'
return 1
end
select @.digit = 20
-- Starting from the right most digit of each card number (excluding
check digit), multiply each digit with 1 or 2
-- (starting from 1 and alternating between 1 and 2 until the left
most digit is reached.)
while @.digit > 0
begin
insert #checksum(
id,
digit,
value
)
select id,
@.digit,
convert(smallint, substring(card_no, @.digit, 1)) *
(((len(rtrim(card_no)) - @.digit) % 2) + 1)
from #credit_card_numbers
where len(rtrim(card_no)) > @.digit
and IsNumeric(card_no) = 1
if @.@.error <> 0
begin
raiserror 99999 'Error inserting into #checksum'
return 1
end
select @.digit = @.digit - 1
end
-- Where the checksum is 2 digits, add each of the digits together.
update #checksum
set value = (value / 10) + (value % 10)
where value >= 10
if @.@.error <> 0
begin
raiserror 99999 'Error updating #checksum (1).'
return 1
end
-- Get checksum totals for each card.
insert #checksum_totals(
id,
value
)
select id,
sum(value)
from #checksum
group by
id
if @.@.error <> 0
begin
raiserror 99999 'Error inserting into #checksum_totals.'
return 1
end
-- Do the Mod 10 calculation.
update #checksum_totals
set value = (10 - (value % 10)) % 10
if @.@.error <> 0
begin
raiserror 99999 'Error updating #checksum_totals.'
return 1
end
-- Compare the check digit of each card number with the calculated
checksum to determine whether it's valid.
update #credit_card_numbers
set valid = 'Y'
from #credit_card_numbers c,
#checksum_totals ct
where c.id = ct.id
and IsNumeric(c.card_no) = 1
and convert(smallint, substring(c.card_no, len(rtrim(c.card_no)), 1))
= ct.value
if @.@.error <> 0
begin
raiserror 99999 'Error setting #credit_card_numbers.valid to Y'
return 1
end
return 0
end
go
IF OBJECT_ID('val_credit_card_numbers') IS NOT NULL
BEGIN
PRINT '<<< CREATED PROC val_credit_card_numbers >>>'
GRANT EXECUTE ON val_credit_card_numbers TO PUBLIC
END
ELSE
PRINT '<<< FAILED CREATING PROC val_credit_card_numbers >>>'
go|||Thank you! This is exactly what I was looking for.
-Shiva
<kriskirk@.hotmail.com> wrote in message
news:1146969910.177407.67600@.y43g2000cwc.googlegroups.com...
> Try this:
> /*
> * DROP PROC val_credit_card_numbers
> */
> IF OBJECT_ID('val_credit_card_numbers') IS NOT NULL
> BEGIN
> DROP PROC val_credit_card_numbers
> PRINT '<<< DROPPED PROC val_credit_card_numbers >>>'
> END
> go
> create procedure val_credit_card_numbers
> as
> begin
> /*
> Note: The following table must be created and populated prior to
> calling this procedure:
> create table #credit_card_numbers(
> id int not null,
> card_no char(20) not null,
> valid char(1) not null
> )
> */
> declare @.digit int
> create table #checksum(
> id int not null,
> digit smallint not null,
> value smallint not null
> )
> create table #checksum_totals(
> id int not null,
> value smallint not null
> )
> create unique clustered index i1 on #checksum_totals(id)
> -- Assume numbers are invalid unless proven otherwise.
> update #credit_card_numbers
> set valid = 'N'
> if @.@.error <> 0
> begin
> raiserror 99999 'Error setting #credit_card_numbers.valid to N'
> return 1
> end
> select @.digit = 20
> -- Starting from the right most digit of each card number (excluding
> check digit), multiply each digit with 1 or 2
> -- (starting from 1 and alternating between 1 and 2 until the left
> most digit is reached.)
> while @.digit > 0
> begin
> insert #checksum(
> id,
> digit,
> value
> )
> select id,
> @.digit,
> convert(smallint, substring(card_no, @.digit, 1)) *
> (((len(rtrim(card_no)) - @.digit) % 2) + 1)
> from #credit_card_numbers
> where len(rtrim(card_no)) > @.digit
> and IsNumeric(card_no) = 1
> if @.@.error <> 0
> begin
> raiserror 99999 'Error inserting into #checksum'
> return 1
> end
> select @.digit = @.digit - 1
> end
> -- Where the checksum is 2 digits, add each of the digits together.
> update #checksum
> set value = (value / 10) + (value % 10)
> where value >= 10
> if @.@.error <> 0
> begin
> raiserror 99999 'Error updating #checksum (1).'
> return 1
> end
> -- Get checksum totals for each card.
> insert #checksum_totals(
> id,
> value
> )
> select id,
> sum(value)
> from #checksum
> group by
> id
> if @.@.error <> 0
> begin
> raiserror 99999 'Error inserting into #checksum_totals.'
> return 1
> end
> -- Do the Mod 10 calculation.
> update #checksum_totals
> set value = (10 - (value % 10)) % 10
> if @.@.error <> 0
> begin
> raiserror 99999 'Error updating #checksum_totals.'
> return 1
> end
> -- Compare the check digit of each card number with the calculated
> checksum to determine whether it's valid.
> update #credit_card_numbers
> set valid = 'Y'
> from #credit_card_numbers c,
> #checksum_totals ct
> where c.id = ct.id
> and IsNumeric(c.card_no) = 1
> and convert(smallint, substring(c.card_no, len(rtrim(c.card_no)), 1))
> = ct.value
> if @.@.error <> 0
> begin
> raiserror 99999 'Error setting #credit_card_numbers.valid to Y'
> return 1
> end
> return 0
> end
> go
> IF OBJECT_ID('val_credit_card_numbers') IS NOT NULL
> BEGIN
> PRINT '<<< CREATED PROC val_credit_card_numbers >>>'
> GRANT EXECUTE ON val_credit_card_numbers TO PUBLIC
> END
> ELSE
> PRINT '<<< FAILED CREATING PROC val_credit_card_numbers >>>'
> go
>

Credentials used to run this report are not stored.

I created a report in SSRS, and deployed it. I have created security where when users run the on demand report, it will prompt them for a username and password. I went to the properties of the report then Execution, and tried to set up report execution snapshot and got an error 'Credentials used to run this report are not stored.' I get the same error if I go to History and try to select any of the options there.

Hello,

In order to create a subscription/snapshot, you have to store credentials to run the report. If you don't store the credentials, when it goes to run unattended, it has no connection information.

Jarret

|||Where do I store these credentials?|||

Hello,

Go to the properties of your report, then click on 'Data Sources' on the left. In here, select 'Credentials stored securely in the report server' and supply a username and password. If you use a Windows account, you have to give the domain as well (domain\user) and check the box for 'Use as Windows credentials when connecting to the data source'. Hit Apply.

Hope this helps.

Jarret

|||That worked....thanks!!