Showing posts with label multiple. Show all posts
Showing posts with label multiple. Show all posts

Friday, March 30, 2012

how to manage concurrency between multiple, disconnected clients

I have a system use MS SQL 2005 & .NET 2.0, my tables don't have rowversion, but I heard SQL 2005 manage a rowversion by itself, can I use this to do a "ConflictDetection".

All I try to do is I want to get a error when I try to update a row which been modified by someone else after I read row.

Thanks.


I have never used SQL Server 2005 timestamp field which is what you are referring to as the row version. This is an autoincrementing field when a change is detected and is useful in preventing dirty writes.

I have used this practice in managing phantom data back with SQL Server 2000 just by adding a column of type INT and incrementing it each time the record is changed. Basically this is how it works, when I retrieve the record, I get a version of 1, at the same time another person gets the same record with version 1 as well. This person then updates the record causing it to increment to 2. In the meantime, I decide to update the record as well, your application or database should compare the version number you have which is 1 with the current version number at the database, if it is the same then allow update as this mean no changes were detected. In this case the version is at 2 which means the copy of the data at version 1 when i retrieved it is stale and you would alert the user that either they cannot save until they do a refresh or inform them if the choose to proceed, data will be lost.

Using row versions is optimistic locking as many people can read the same record.

You can also use pessimistic looking by locking the record once you have it. You can do this by using Transactions in .NET (System.Data.SqlClient.Transaction) and specify the Isolation levels.


How to make the report show fields in multiple columns?

I am writing a report in SQL server 2005 Reporting service. The report has two parts: first part shows basic information about the client; the second part lists all the softwares the client has. My question is how to make the softwares listed in two columns as shown below?

John Smith

Title: MSTP Location: Main Campus IP:127.0.0.1

Softwares:

Adobe Standard 7.0 Access 5.0

Internet Explore 6.0 Office XP

Any suggestion is appreciated.

There is an option in Crystal Reports -- "Format with multiple columns". I couldn't find the similar configuration in SQL reporting. There is a "Columns" setting in Body Properties, but it doesn't work as making the report in multiple columns. Please help!!

Monday, March 12, 2012

How to list all history/snapshots of a given report

We are running SSRS2005 and produce multiple reports.

Our users need history report data so we set up snapshots executions to run weekly.

How do we display the list of these historical snapshots to the users for selection?

Currently we code:

http://myserver/Reports/Pages/Report.aspx?ItemPath=/myreports/Available+Floor+Space&rs:Command=Render&SelectedTabId=SnapshotsTab

That is not preferred as the user is presented the Report Manager interface and can go use other functionality such as subscriptions etc... that we do not support.

Is there (a) a way to suppress the Report Manager controls? or (b)another way to list the snapshots executed given a report name( maybe by querying the report server database?) or (c) code http://myserver/Reportserver/?/myreports/Available+Floor+Space&rs:Command=Render&? to get the history listing?

Thanks

Hi,

The best way is to use Reporting Services Web Services.

You need to add a Web Reference to your Reporting Server and name it <ReferenceName>. Once it is setup you can call the web services using the <ReferenceName>.

In your class first you need to add the "using" statement....

using <NameSpace>.<ReferenceName>.

then in the code you can use...

ReportingService rs = new ReportingService();

rs.Credentials = <your credentials>;

ReportHistorySnapshot[] historySnapshotList = rs.ListReportHistory(<report name>);

Hope this will help you.

Thanks.

Hammad

Friday, March 9, 2012

how to link multiple datasets's parameters?

I created three datasets. Every one has the same parameter and I need to link
them together. How to do it?
Thx.You can create a global report parameter and link it to the parameters in
your query. See the sample Sales Invoice report included in the RS samples.
--
HTH,
---
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
---
"Mia" <Mia@.discussions.microsoft.com> wrote in message
news:5DD6DD82-8A1B-4C36-B6BC-13F2C3FF9554@.microsoft.com...
>I created three datasets. Every one has the same parameter and I need to
>link
> them together. How to do it?
> Thx.|||Where do I find these sample reports?
I can't find any mention of global report parameters in BOL
"Teo Lachev [MVP]" wrote:
> You can create a global report parameter and link it to the parameters in
> your query. See the sample Sales Invoice report included in the RS samples.
> --
> HTH,
> ---
> Teo Lachev, MVP, MCSD, MCT
> "Microsoft Reporting Services in Action"
> "Applied Microsoft Analysis Services 2005"
> Home page and blog: http://www.prologika.com/
> ---
> "Mia" <Mia@.discussions.microsoft.com> wrote in message
> news:5DD6DD82-8A1B-4C36-B6BC-13F2C3FF9554@.microsoft.com...
> >I created three datasets. Every one has the same parameter and I need to
> >link
> > them together. How to do it?
> >
> > Thx.
>
>|||Install the sample reports that come with RS. With RS 2000, there should be
a link to the installer in the Reporting Services group. I called them
"global" because they are report-level parameters.
--
HTH,
---
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
---
"David" <David@.discussions.microsoft.com> wrote in message
news:FF10B3A5-5E2E-487F-87A4-21CDD6C79F0D@.microsoft.com...
> Where do I find these sample reports?
> I can't find any mention of global report parameters in BOL
> "Teo Lachev [MVP]" wrote:
>> You can create a global report parameter and link it to the parameters in
>> your query. See the sample Sales Invoice report included in the RS
>> samples.
>> --
>> HTH,
>> ---
>> Teo Lachev, MVP, MCSD, MCT
>> "Microsoft Reporting Services in Action"
>> "Applied Microsoft Analysis Services 2005"
>> Home page and blog: http://www.prologika.com/
>> ---
>> "Mia" <Mia@.discussions.microsoft.com> wrote in message
>> news:5DD6DD82-8A1B-4C36-B6BC-13F2C3FF9554@.microsoft.com...
>> >I created three datasets. Every one has the same parameter and I need to
>> >link
>> > them together. How to do it?
>> >
>> > Thx.
>>|||OK, I have that report and opened it.
There is 2 datasets and each datasets as the same parameter name in the query.
Is the Global Report Paremeter, that you are refering to, this dialog box:
REPORT>REPORT PARAMETERS
If so, how do you go about linking this parameter to the parameters in your
query?
Normally, when you create the parameter in your query, it appears
automatically in this dialog box. But what do you do if it doesn't?
"Teo Lachev [MVP]" wrote:
> Install the sample reports that come with RS. With RS 2000, there should be
> a link to the installer in the Reporting Services group. I called them
> "global" because they are report-level parameters.
> --
> HTH,
> ---
> Teo Lachev, MVP, MCSD, MCT
> "Microsoft Reporting Services in Action"
> "Applied Microsoft Analysis Services 2005"
> Home page and blog: http://www.prologika.com/
> ---
> "David" <David@.discussions.microsoft.com> wrote in message
> news:FF10B3A5-5E2E-487F-87A4-21CDD6C79F0D@.microsoft.com...
> > Where do I find these sample reports?
> >
> > I can't find any mention of global report parameters in BOL
> >
> > "Teo Lachev [MVP]" wrote:
> >
> >> You can create a global report parameter and link it to the parameters in
> >> your query. See the sample Sales Invoice report included in the RS
> >> samples.
> >>
> >> --
> >> HTH,
> >> ---
> >> Teo Lachev, MVP, MCSD, MCT
> >> "Microsoft Reporting Services in Action"
> >> "Applied Microsoft Analysis Services 2005"
> >> Home page and blog: http://www.prologika.com/
> >> ---
> >> "Mia" <Mia@.discussions.microsoft.com> wrote in message
> >> news:5DD6DD82-8A1B-4C36-B6BC-13F2C3FF9554@.microsoft.com...
> >> >I created three datasets. Every one has the same parameter and I need to
> >> >link
> >> > them together. How to do it?
> >> >
> >> > Thx.
> >>
> >>
> >>
>
>|||1. You use a placeholder for this parameter in your dataset query, e.g.:
WHERE (SOH.SalesOrderNumber = @.SalesOrderNumber)
2. You open the dataset properties and in the Parameters tab you link the
query parameter to the report-level parameter, like so:
Name Value
-- ---
@.SalesOrder Header =Parameters!SalesOrderNumber.Value
--
HTH,
---
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
---
"David" <David@.discussions.microsoft.com> wrote in message
news:168C68E8-B032-4668-9AB3-A52EBB4E3342@.microsoft.com...
> OK, I have that report and opened it.
> There is 2 datasets and each datasets as the same parameter name in the
> query.
> Is the Global Report Paremeter, that you are refering to, this dialog box:
> REPORT>REPORT PARAMETERS
> If so, how do you go about linking this parameter to the parameters in
> your
> query?
>
> Normally, when you create the parameter in your query, it appears
> automatically in this dialog box. But what do you do if it doesn't?
>
> "Teo Lachev [MVP]" wrote:
>> Install the sample reports that come with RS. With RS 2000, there should
>> be
>> a link to the installer in the Reporting Services group. I called them
>> "global" because they are report-level parameters.
>> --
>> HTH,
>> ---
>> Teo Lachev, MVP, MCSD, MCT
>> "Microsoft Reporting Services in Action"
>> "Applied Microsoft Analysis Services 2005"
>> Home page and blog: http://www.prologika.com/
>> ---
>> "David" <David@.discussions.microsoft.com> wrote in message
>> news:FF10B3A5-5E2E-487F-87A4-21CDD6C79F0D@.microsoft.com...
>> > Where do I find these sample reports?
>> >
>> > I can't find any mention of global report parameters in BOL
>> >
>> > "Teo Lachev [MVP]" wrote:
>> >
>> >> You can create a global report parameter and link it to the parameters
>> >> in
>> >> your query. See the sample Sales Invoice report included in the RS
>> >> samples.
>> >>
>> >> --
>> >> HTH,
>> >> ---
>> >> Teo Lachev, MVP, MCSD, MCT
>> >> "Microsoft Reporting Services in Action"
>> >> "Applied Microsoft Analysis Services 2005"
>> >> Home page and blog: http://www.prologika.com/
>> >> ---
>> >> "Mia" <Mia@.discussions.microsoft.com> wrote in message
>> >> news:5DD6DD82-8A1B-4C36-B6BC-13F2C3FF9554@.microsoft.com...
>> >> >I created three datasets. Every one has the same parameter and I need
>> >> >to
>> >> >link
>> >> > them together. How to do it?
>> >> >
>> >> > Thx.
>> >>
>> >>
>> >>
>>|||Thank You!
Thank You!
Thank You!
I have been having a hell of a time trying to figure out the solution top
this problem.
I was developing a report that had the WHERE clause hard code with a value.
Once I completed development, I change the hard code to a parameter. RS would
not recognize it as a parameter and kept telling my variables were unbound.
I was all over the net and this forum trying to find the answer.
"Teo Lachev [MVP]" wrote:
> 1. You use a placeholder for this parameter in your dataset query, e.g.:
> WHERE (SOH.SalesOrderNumber = @.SalesOrderNumber)
> 2. You open the dataset properties and in the Parameters tab you link the
> query parameter to the report-level parameter, like so:
> Name Value
> -- ---
> @.SalesOrder Header =Parameters!SalesOrderNumber.Value
> --
> HTH,
> ---
> Teo Lachev, MVP, MCSD, MCT
> "Microsoft Reporting Services in Action"
> "Applied Microsoft Analysis Services 2005"
> Home page and blog: http://www.prologika.com/
> ---
> "David" <David@.discussions.microsoft.com> wrote in message
> news:168C68E8-B032-4668-9AB3-A52EBB4E3342@.microsoft.com...
> > OK, I have that report and opened it.
> >
> > There is 2 datasets and each datasets as the same parameter name in the
> > query.
> >
> > Is the Global Report Paremeter, that you are refering to, this dialog box:
> > REPORT>REPORT PARAMETERS
> >
> > If so, how do you go about linking this parameter to the parameters in
> > your
> > query?
> >
> >
> > Normally, when you create the parameter in your query, it appears
> > automatically in this dialog box. But what do you do if it doesn't?
> >
> >
> > "Teo Lachev [MVP]" wrote:
> >
> >> Install the sample reports that come with RS. With RS 2000, there should
> >> be
> >> a link to the installer in the Reporting Services group. I called them
> >> "global" because they are report-level parameters.
> >>
> >> --
> >> HTH,
> >> ---
> >> Teo Lachev, MVP, MCSD, MCT
> >> "Microsoft Reporting Services in Action"
> >> "Applied Microsoft Analysis Services 2005"
> >> Home page and blog: http://www.prologika.com/
> >> ---
> >> "David" <David@.discussions.microsoft.com> wrote in message
> >> news:FF10B3A5-5E2E-487F-87A4-21CDD6C79F0D@.microsoft.com...
> >> > Where do I find these sample reports?
> >> >
> >> > I can't find any mention of global report parameters in BOL
> >> >
> >> > "Teo Lachev [MVP]" wrote:
> >> >
> >> >> You can create a global report parameter and link it to the parameters
> >> >> in
> >> >> your query. See the sample Sales Invoice report included in the RS
> >> >> samples.
> >> >>
> >> >> --
> >> >> HTH,
> >> >> ---
> >> >> Teo Lachev, MVP, MCSD, MCT
> >> >> "Microsoft Reporting Services in Action"
> >> >> "Applied Microsoft Analysis Services 2005"
> >> >> Home page and blog: http://www.prologika.com/
> >> >> ---
> >> >> "Mia" <Mia@.discussions.microsoft.com> wrote in message
> >> >> news:5DD6DD82-8A1B-4C36-B6BC-13F2C3FF9554@.microsoft.com...
> >> >> >I created three datasets. Every one has the same parameter and I need
> >> >> >to
> >> >> >link
> >> >> > them together. How to do it?
> >> >> >
> >> >> > Thx.
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>