Showing posts with label call. Show all posts
Showing posts with label call. Show all posts

Monday, March 12, 2012

Error when calling a Sub report (Jump to report)

I have created a two reports with a parameterized query - one master and one sub report.
When I want to call the sub report from the master report I would like to be able to pass the values for the parameters in to the sub report.

And I also don′t want the passed parameters to be prompted in the sub report (so I blanked out the 'Prompt:' field).

But I got following error:
The report parameter 'parameter name' is read-only and cannot be modified.

What to do?

Running Report Server: 8.00.743.00

/Christofer

Instead of blanking the Prompt field, check the 'Hidden' checkbox.|||

Well...
Should it be in the Report Parameters dialog box where I define parameters?
If so, I can′t find this checkbox "Hidden" in my version, or where should I find it?

Regards,
Christofer

Wednesday, March 7, 2012

Error using Verify/Repair methods of SqlCeEngine

I have a compact pc program that uses a sql server database (sdf file).
I want to check the database integrity when program starts so I added a call to veriy method of SqlCeEngine.

The verify function always returns false even the database is OK and I can work with it.

when I call repair it throws the exception : "The specified module could not be found"

The code is :

string connectionString = "Data Source = '" + m_dbFullName + "'";

SqlCeEngine engine = new SqlCeEngine(connectionString);

if(engine.Verify() == false)

{

engine.Repair(null, RepairOption.RecoverCorruptedRows);

}

The database exists and the path to it is correct:

dbFullName = "\\program files\\MyApp\\MyDB.sdf"

I also tried out some different connection strings but it did not help:

"Data Source = ' MyDB.sdf '"

"Data Source = 'MyDB.sdf "

"Data Source=' MyDB.sdf '"

"Data Source=MyDB.sdf"

Please any one can help me with this ?

I have the same problem...

Error using pivot transform

Hey, did someone try to use the pivot transform?
It's not what you would call easy to configure...

In BOL there is the following section:
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/extran9/html/55f5db6e-6777-435f-8a06-b68c129f8437.htm

I have followed the instructions there and I get an error when I try to map the new output column to the pivotkey:

"Output column "Yellow" (69) cannot be mapped to PivotKey input column"

So I mapped the new output column to the column holding the quantity values. This worked.
May this be a bug in BOL?

Further on I got some strange behaviour of the pivot transform:

My input is the following CSV-Flatfile:
sk1;sk2;pk1;qty
A;1;Yellow;2
A;1;Green;1
B;1;Yellow;5
A;2;Blue;3
A;2;Green;9
A;1;Green;5

If I omit the last line, everything is fine.
When passing the file as is into the pivot transform the output is:

SK1 SK2 Yellow Green Blue
A 1 2 1 NULL
B 1 5 NULL NULL
A 2 NULL 9 3
A 1 NULL 5 NULL

As you can see the key a;1 is duplicate. The cols SK1 and SK2 are my primary key of the destination table.

When the input is sorted by the first two colums the pivot transform throws an Error:

Error: 0xC02020CF at Pivot w sort, Pivot [39]: Duplicate pivot key value "Green".

I expected to have a sum over all Green for the key A;1. It seems that I have to use an aggregate which in my opinion should
be obsolete here.

As a conclusion I have to say that this task is far away from perfect but not bad for a start.

Regards
Fridtjof

>>May this be a bug in BOL?

Yes, it was. This was reported by Jamie as well and I believe this had been fixed in BOL web release back in last fall.

What you noticed in by design, Pivot transform requires its input rows to be sorted on SetKey columns, (this should be on BOL as well, I will confirm later), and there should be no duplicate rows on the same SetKey on a same pivot key value - in other words, if you have

A, 1 Green 1

A, 1 Geen 5

Remember, after Pivoting, Green will become a column, and these two rows will cause conflicts on pivot's output row for the same "A,1" on that "Green" column.

Yes, you will need a Aggregate, Pivot does not do any aggregation.

HTH

Wenyang


|||Thanks Wenyang,

by the way: The mapping method in this task should be worked on to make it easier for noobs like me to do the mapping :)

Another point: If the transform requires to be sorted on the SetKey then why doesn't it claim for it to be sorted? Ok that may correspond to the issue above...

HAND
Fridtjof

Error using pivot transform

Hey, did someone try to use the pivot transform?
It's not what you would call easy to configure...

In BOL there is the following section:
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/extran9/html/55f5db6e-6777-435f-8a06-b68c129f8437.htm

I have followed the instructions there and I get an error when I try to map the new output column to the pivotkey:

"Output column "Yellow" (69) cannot be mapped to PivotKey input column"

So I mapped the new output column to the column holding the quantity values. This worked.
May this be a bug in BOL?

Further on I got some strange behaviour of the pivot transform:

My input is the following CSV-Flatfile:
sk1;sk2;pk1;qty
A;1;Yellow;2
A;1;Green;1
B;1;Yellow;5
A;2;Blue;3
A;2;Green;9
A;1;Green;5

If I omit the last line, everything is fine.
When passing the file as is into the pivot transform the output is:

SK1 SK2 Yellow Green Blue
A 1 2 1 NULL
B 1 5 NULL NULL
A 2 NULL 9 3
A 1 NULL 5 NULL

As you can see the key a;1 is duplicate. The cols SK1 and SK2 are my primary key of the destination table.

When the input is sorted by the first two colums the pivot transform throws an Error:

Error: 0xC02020CF at Pivot w sort, Pivot [39]: Duplicate pivot key value "Green".

I expected to have a sum over all Green for the key A;1. It seems that I have to use an aggregate which in my opinion should
be obsolete here.

As a conclusion I have to say that this task is far away from perfect but not bad for a start.

Regards
Fridtjof

>>May this be a bug in BOL?

Yes, it was. This was reported by Jamie as well and I believe this had been fixed in BOL web release back in last fall.

What you noticed in by design, Pivot transform requires its input rows to be sorted on SetKey columns, (this should be on BOL as well, I will confirm later), and there should be no duplicate rows on the same SetKey on a same pivot key value - in other words, if you have

A, 1 Green 1

A, 1 Geen 5

Remember, after Pivoting, Green will become a column, and these two rows will cause conflicts on pivot's output row for the same "A,1" on that "Green" column.

Yes, you will need a Aggregate, Pivot does not do any aggregation.

HTH

Wenyang


|||Thanks Wenyang,

by the way: The mapping method in this task should be worked on to make it easier for noobs like me to do the mapping :)

Another point: If the transform requires to be sorted on the SetKey then why doesn't it claim for it to be sorted? Ok that may correspond to the issue above...

HAND
Fridtjof