Showing posts with label building. Show all posts
Showing posts with label building. Show all posts

Sunday, March 25, 2012

Adding values of rows in ms sql 2000

I am building a website in asp.net 1.1 with vb.net 2003 which will have the standings of the teams in our baseball league. Below is the database table I have created.

ID(int) home_team (nvarchar) away_team(nvarchar) win_teampf(nvarchar) lose_teampf(nvarchar)

1 Elmwood Murdock 7 2
2 Louisville Manley 4 3
3 Manley Elmwood 9 8

ID is the primary key. What I am attempting to do is add each instance of Elmwood from the win column to output the total number of wins from Elmwood and do the same for Elmwood in the losing team to output the total number of losses. The result will look something like this:

Elmwood: 1 Win 1 Loss. .500

Thanks for your reply.

I don't understand how to determine which team lost and which team won. You have columns for the name of the home team, the name of the away team, the winner's score and the loser's score. From what I can see, there is no indication if the home team or the away team won.|||

Oh, that's true. I can add two more columns. One for the losing team and one for the winning team. Thanks for pointing that out. However, I am still confused on how to add the total number of times a team is in the win column and have that value inside a datagrid.

|||

In SQL, you can sum up the wins and losses. If you can modify your table first with WINS and LOSSES columns, it should be a strsight SQL operation.

Something looks like this:

SELECT TeamID, TeamName, SUM(WINColumn) as Wins, SUM(LOSSColumn) AS Losses , (SUM(WINColumn)/SUM(LOSSColumn)) AS GameRatio

FROM YourTable

GROUP BY TeamID, TeamName

|||Thanks for your help. I appreciate it. I attempted this and was unable to link it to my datagrid. Is this a function I need to call from within sql and then pass to the datagrid? Thanks for your help. I haven't been doing asp.net for very long and this forum has helped a lot.|||You can treat the SUM fields as you would to other columns in your datagrid. In your case WINSColumn, LOSSESColumn and GameRatio are your new columns. If you still have problem, post your code here.

Thursday, March 8, 2012

Adding New Folders to Report Server Project

I am building a reporting services project, that will eventually contain 100+
reports.
I would like to add subfolders to my Report Server project, to help with
organising them (Finance,Warehouse etc).
I frequently perform this task in standard VS projects (class libraries
etc), but I can't find an option to do this here.
Is this possible?You should be able to add new projects to your main solution, which will
create a new folder for each project.
Open your solution.
Right click on the Solution name in your Solution Explorer. Click on Add ->
New Project
Type a name and choose the location. It could be as a subfolder of your
solution, or as a new folder somewhere else.
I haven't figured out how to use Shared Data Sources from different sub
projects, but you can copy existing datasources failry easily between the
different projects, so that's not too much of a problem. And by doing it
like this, you can have datasources connecting to the same database with
different credentials in the same project structure, which is nice.
Kaisa M. Lindahl Lervik
"programmer_mike" <programmermike@.discussions.microsoft.com> wrote in
message news:E0499886-58C5-4F62-AE60-44A025FD2EDF@.microsoft.com...
>I am building a reporting services project, that will eventually contain
>100+
> reports.
> I would like to add subfolders to my Report Server project, to help with
> organising them (Finance,Warehouse etc).
> I frequently perform this task in standard VS projects (class libraries
> etc), but I can't find an option to do this here.
> Is this possible?|||I had considered this option, but I would prefer to add multiple folder to
just one project.
If I reference a second report server project, will I be able to pick up
referenced reports in the Navigation -> Jump to report option. (Similar to
the way in which you can search for referenced datasets in standard projects)
I am planning on having a lot of links between reports in my project, and
this is one of the reason why I wanted to avoid multiple projects.
Thank yo for your comments
"Kaisa M. Lindahl Lervik" wrote:
> You should be able to add new projects to your main solution, which will
> create a new folder for each project.
> Open your solution.
> Right click on the Solution name in your Solution Explorer. Click on Add ->
> New Project
> Type a name and choose the location. It could be as a subfolder of your
> solution, or as a new folder somewhere else.
> I haven't figured out how to use Shared Data Sources from different sub
> projects, but you can copy existing datasources failry easily between the
> different projects, so that's not too much of a problem. And by doing it
> like this, you can have datasources connecting to the same database with
> different credentials in the same project structure, which is nice.
> Kaisa M. Lindahl Lervik
>
> "programmer_mike" <programmermike@.discussions.microsoft.com> wrote in
> message news:E0499886-58C5-4F62-AE60-44A025FD2EDF@.microsoft.com...
> >I am building a reporting services project, that will eventually contain
> >100+
> > reports.
> > I would like to add subfolders to my Report Server project, to help with
> > organising them (Finance,Warehouse etc).
> > I frequently perform this task in standard VS projects (class libraries
> > etc), but I can't find an option to do this here.
> > Is this possible?
>
>|||You can use either jump to URL or with the jump to report you specify the
folder as well as the report name. However, you can only test the report
when deployed.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"programmer_mike" <programmermike@.discussions.microsoft.com> wrote in
message news:EFB1314B-6747-4A16-9A74-280662C68EC9@.microsoft.com...
>I had considered this option, but I would prefer to add multiple folder to
> just one project.
> If I reference a second report server project, will I be able to pick up
> referenced reports in the Navigation -> Jump to report option. (Similar to
> the way in which you can search for referenced datasets in standard
> projects)
> I am planning on having a lot of links between reports in my project, and
> this is one of the reason why I wanted to avoid multiple projects.
> Thank yo for your comments
> "Kaisa M. Lindahl Lervik" wrote:
>> You should be able to add new projects to your main solution, which will
>> create a new folder for each project.
>> Open your solution.
>> Right click on the Solution name in your Solution Explorer. Click on
>> Add ->
>> New Project
>> Type a name and choose the location. It could be as a subfolder of your
>> solution, or as a new folder somewhere else.
>> I haven't figured out how to use Shared Data Sources from different sub
>> projects, but you can copy existing datasources failry easily between the
>> different projects, so that's not too much of a problem. And by doing it
>> like this, you can have datasources connecting to the same database with
>> different credentials in the same project structure, which is nice.
>> Kaisa M. Lindahl Lervik
>>
>> "programmer_mike" <programmermike@.discussions.microsoft.com> wrote in
>> message news:E0499886-58C5-4F62-AE60-44A025FD2EDF@.microsoft.com...
>> >I am building a reporting services project, that will eventually contain
>> >100+
>> > reports.
>> > I would like to add subfolders to my Report Server project, to help
>> > with
>> > organising them (Finance,Warehouse etc).
>> > I frequently perform this task in standard VS projects (class libraries
>> > etc), but I can't find an option to do this here.
>> > Is this possible?
>>|||By test the report I meant test the link.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"programmer_mike" <programmermike@.discussions.microsoft.com> wrote in
message news:EFB1314B-6747-4A16-9A74-280662C68EC9@.microsoft.com...
>I had considered this option, but I would prefer to add multiple folder to
> just one project.
> If I reference a second report server project, will I be able to pick up
> referenced reports in the Navigation -> Jump to report option. (Similar to
> the way in which you can search for referenced datasets in standard
> projects)
> I am planning on having a lot of links between reports in my project, and
> this is one of the reason why I wanted to avoid multiple projects.
> Thank yo for your comments
> "Kaisa M. Lindahl Lervik" wrote:
>> You should be able to add new projects to your main solution, which will
>> create a new folder for each project.
>> Open your solution.
>> Right click on the Solution name in your Solution Explorer. Click on
>> Add ->
>> New Project
>> Type a name and choose the location. It could be as a subfolder of your
>> solution, or as a new folder somewhere else.
>> I haven't figured out how to use Shared Data Sources from different sub
>> projects, but you can copy existing datasources failry easily between the
>> different projects, so that's not too much of a problem. And by doing it
>> like this, you can have datasources connecting to the same database with
>> different credentials in the same project structure, which is nice.
>> Kaisa M. Lindahl Lervik
>>
>> "programmer_mike" <programmermike@.discussions.microsoft.com> wrote in
>> message news:E0499886-58C5-4F62-AE60-44A025FD2EDF@.microsoft.com...
>> >I am building a reporting services project, that will eventually contain
>> >100+
>> > reports.
>> > I would like to add subfolders to my Report Server project, to help
>> > with
>> > organising them (Finance,Warehouse etc).
>> > I frequently perform this task in standard VS projects (class libraries
>> > etc), but I can't find an option to do this here.
>> > Is this possible?
>>