Showing posts with label newbie. Show all posts
Showing posts with label newbie. Show all posts

Sunday, March 25, 2012

Calculated fields

I'm an SRS 2005 newbie. I'm trying to create a Cash Requirements
Forecast that plots values in six weekly buckets (columns) based on
the Required Date from line items in the PO. I'm stuck on one last
task in the report - getting the values bucketed - and am trying to
use calculated fields to do so.
REQDATE is the field from the PO line item that I'm applying this
expression to. startdate is a parameter that I have setup. I'm
trying to limit the output in a field on the report to a one-week
period beginning on the startdate that the user selects. Here is my
expression for that calculated field -
=Fields!REQDATE.Value>=Parameters!startdate.Value And Fields!
REQDATE.Value < (Parameters!startdate.Value+8)
First, is this the correct way to do this? If not, how should I
calculate this value and add it to my Matrix?
Second, should I be using a Matrix in my report or a Table? It seems
less than intuitive as to how to add column fields in a Matrix so
perhaps I should be using a Table instead.
Third, please keep any responses in plain English as I'm not a
programmer and I did not stay at Holiday Inn Express last night.
Thanks and best regards,
Frank Hamelly
MCP-GP, MCT
East Coast Dynamics
www.eastcoast-dynamics.comQuestions:
1. What's a PO?
2. Is this what you want your report to look like:
Week of 12/3-12/10 | Week of
12/11-12/18 |
Bikes
50 58
Cars
1 3
Boats
0 99
I'm guessing you want to combine all items that fit in that week.
Some answers:
Your expression will not work unfortunately. Second, you should use
the SQL statement in the data table and your parameter to limit the
records for the dates you select. Sorry I have to talk geek now so
book a room in the Holiday Inn (I still have no idea what that joke
referenced). For example:
select *
from table1
where datetime >= @.startdate
When the user puts a start date, the query will only bring back data
after that so you are limiting your data from the get go. If you
understand me so far and you can answer my questions, I can try to
help you out a little more.|||On Dec 5, 9:53 am, SQL Guy <ayma...@.gmail.com> wrote:
> (I still have no idea what that joke referenced).
There is a long-running series of television commercials here in the
USA about a chain of hotels called "Holiday Inn Express". In the
commercial, a person is doing a very technical job (doctor,
electrician, etc) using all sorts of jargon, and at the end of the
commercial the person says "Oh, I'm not a <profession>, I just stayed
at a Holiday Inn Express last night", implying that simply sleeping at
the hotel will make you more rested and more intelligent the next
day.
As far as the query, SQL Guy is correct, it will be more efficient to
limit the data to 7 days in the Data tab (the query itself) rather
than filtering the data in the report. Imagine that 5 years from now
your query returned 20,000 rows, so every time you view the query, it
has to pull all the data from the database, then filter it down at
Report Render time to the 10 that occurred this week. Inefficient.
It is much better to put a WHERE clause in the query to let the server
limit the rows.
Next the "weekly buckets": go to your DataSet, right-click and Add a
new Field, then give it a calculated expression like:
= DateAdd( "d", 1 - Weekday(Fields!datetime.Value), Fields!
datetime.Value )
for every row in your DataSet, this returns a DateTime equal to the
Sunday in that week based off of the field datetime. You can then
group on this calculated field just like you would any othe from your
original dataset.
The Matrix object is good when you have an undetermined number of
elements that you want to group by. For example, you put LineItem in
the Rows group, the calculted Week field in the Column group, and
=Format( Sum( Fields!amount.Value ), "$#,##0.00") in the Details
group. You dont care how many line items you have to report on, or
how many weeks you are reporting, the object draws it.
But, a Table is good for... well... tabular reports. You have one
report for a week period, each Detail row is a line item, and you have
a column that is explicitly one value of your billing amount per line
item. Sum()s then go in headers and footers, with some grouping
capability as well. When you Group here (by right-clicking and Adding
a Group), it just repeats the Grouped sections, and every section has
the exact same explicit layout.
-- Scott|||Thank yoiu Scott and SQL Guy. Scott, what does the "d" in the
expression represent?
Thx, Frank|||Also, assuming I need 6 distinct weekly buckets in my report, I need
to define 6 calculated fields with explicit filtering for each field,
correct? If so, how/where do I insert the calculated fields into the
matrix so that the result is a 6-week header with one column for each
week?
Thanks so much. I really appreciate the help. I've been trying to
figure this out on my own for too long now!
Frank|||On Dec 5, 11:54 am, "Frank Hamelly, MCP-GP" <fhame...@.cfl.rr.com>
wrote:
> Also, assuming I need 6 distinct weekly buckets in my report, I need
> to define 6 calculated fields with explicit filtering for each field,
> correct? If so, how/where do I insert the calculated fields into the
> matrix so that the result is a 6-week header with one column for each
> week?
> Thanks so much. I really appreciate the help. I've been trying to
> figure this out on my own for too long now!
> Frank
The "d" represents Day. The DateAdd function is very funky. Unlike
normal VB, the DateAdd and Format commands use case sensitive
identifiers: MM for month, dd for day, yyyy for year, HH for 24 hour
format, hh for 12 hour format, mm for minutes, ss for second.
The way a Matrix works is that it takes the Field that you supplied,
breaks it into Groups containing distinct values of the contents of
the Field, then Aggregates on the Group in the Details section. The
two display groups are Rows and Columns.
Think of it this way, you have a list of items with similar
characteristics:
Shape, Color, Price
Circle, Red, $10
Circle, Green, $25
Square, Blue, $15
Square, Red, $5
If you drag the Shape field into a Row of a Matrix, and the Color into
a Column, and the =Sum( Fields!Price.Value ) in the Details section,
when you go to Preview mode you will see two rows (Circle and
Sequare), three columns (Red, Green, Blue), and Summed values ($10 |
$25 | Nothing || $5 | Nothing | $15) in the Details table. You didn't
have to define anything, it just evaluated the row contents and
created the groups.
For your dataset:
-- If using a Matrix, all you need is a Field that returns 6 distinct
values for your 6 weeks, and it will automatically build 6 columns.
Any function in the Details section is going to display the aggregate
for only the
-- If using a Table, you will need 6 distinct calculations, and it
gets a little trickier.
1. Add a "WeekDate" Field that rounds the ReqDate back to the first
day of the week using the method previously outlined.
2. Drag the "WeekDate" into the Column section of the Matrix
3. Drag the "LineItemName" into the Row section of the Matrix
4. Drag the "AmountNeedingAggregation" into the Details section of
the Matrix
Right-click on the Row/Column to and Edit Group to change Sorting,
Filtering, etc.
-- Scott|||Thanks for the Holiday Inn info. I've stayed in so many but I don't
watch TV at all so that's why I was missing that valuable nugget of
information. I now feel like I've spent the night there!
"d" stands for day. That function is quite nice for many things. Lets
say you want to default a parameter to last week you can simply type
for the default parameter =dateadd("d",-7,today()) - today is a
function that gets today's date in RS. So what I understand from
Orne's suggestion is that he will take the date in the field and
subtract it from... actually I'm not really following that so much
maybe because it's almost closing time. I think it can be done in
tabular form but I will wait for Orne's explanation so I can better
understand what he's trying to get at.|||Thank you Scott and SQL Guy for your help. I'm going to give your
further suggestions a try tomorrow.
Thanks again,
Frank

Friday, February 24, 2012

C# SQL ID field Datagrid and DataSource

OK I am a newbie when it comes to lots of .Net so if you answer go slowwww. I have an auto incrementing ID field in a SQL database.

This is all displayed to the user in a datagrid control. I add two or three new rows and AcceptChanges.

At this point I my ID field displayed on the grid bound tot he SQL ID field is out of Sync. What the#@.^%#$&*

In fact it looks like the data grid placed in its own numbers by doing some sort of Maxvalue on the column.

HELP!

Bob

Chicago_Bob:

In fact it looks like the data grid placed in its own numbers by doing some sort of Maxvalue on the column.

Can you explain more about what's the exact problem you're facing? How does the indentity column look like now? Do you mean the new rows got wrong IDs (not the maxID+1/+2)?

|||

I did some digging last night to find I am not alone in this problem this is a thing that might be addressed by

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconretrievingidentityorautonumbervalues.asp

I am not sure yet but to tell you the truth this bites. The ID column beucase the dataset is disconected does not stay in sync with the

ID column. SQL can be on number 999 and the ID will be MAX ID of the record set + 1. YIKES!!! And the error is only know when you

try to update the record set. It will reply with a Concurency error. DOH! It took a while to relate the 2 together. Who would have thought..

Anyway the dataset the DataGrid and therefore the results of the DataGrid are not correct when you accept changes and you have a SQL table with an autoincrement field. NOT GOOD.. There is nothing anywhere that spells this out when you read about the DataSet or DatGrid.

In fact web searching turns up little if anything at all. Guess thats what I guess for using those pretty tools in .NET eh?

Bob

|||

Rant mode.

I thought this was a 3 maybe 4 hour job. MultiLine copy and Paste addition to the DataGrid control. I already had the code to do a one line copy and paste. So what a little loop code and I was out of there.. That would be normal. But what in using RAD tools is normal? I did finally get my multirow copy and paste to work but it took quite a bit of playing "twist the code" and it was not pleasant. Here is a few of the issues that I hit like a brick wall.

I use a SQL autoincrement ID field so multiple users can be making changes etc. WELL bad idea with the DataGrid.. First the ID sync is not in sync with SQL server. You have to cusomize your autogenerated code to do insert to work with a Stored Proc so you can get a value back which is the magical ID. How intuitive that was. I saw no mention of this anywhere in the Grid docs. The error is special as well "Concerency error " (which makes total sense to eveyrone here I am sure but not to me) when I did not have my ID's displayed. So after 1 day of fishing on the Net I get some info about how to do this with a data set. Its the link above. It does work butWARNING if you even look at your XSD and check some properties and save the OLD code I had for insert whacks the new. So after retyping again I am afraid to go back and even breath on that stuff..

Now onto the multiple other hurdles. If you have a bound Grid control youcan not simply add a row. WHY? Cause its bound the compiler tells me, But thats why I bound it! I bound it so I can use the Grid to manipulate the dataset. I was stumped for an aswer until I saw that you can get the last row of the Grid by usingdataGridView1.NewRowIndex; COOL I fill in the data and do the Accept and update and .... Nothing. The data is added to the Grid but not to SQL. BUMMER. After playing around for several hours with this idea and that I got a new idea.I need to add a row so I figure you add a record to the dataset. Yeah that should do it. Great three lines of code to add the row. I change my paste function to place data into each data field in the new data row and do an update and accept. I query SQL Server using Enterpirse manager and see the data is there but the grid? It shows nothing. Empty...?

Isnt the Grid suppossed to update with the new data when I update the dataset and accept the data with adapter. Guess NOT.. I thought they were connected. Oh well I go back to the old code and add data to the grid and add a new row this caused me to get 2 rows for every one that I added. Yeah that was FUN but I figured out why that was happening. The index to the Grids row would update as soon as you add row a row to the dataset. This would start my new row below my old row and I would 2 records in SQL and one would be blank etc. Bad Stuff. Here is the original snipit.

instEditsDataSet1.EQ_IntranetReportData.Rows.Add(myRow);

row = dataGridView1.NewRowIndex;

// add a row to the data set.

dataGridView1.CurrentCell = dataGridView1[0, row];

------ BUT if you switchit around -----

// add a row to the data set.

row = dataGridView1.NewRowIndex;

instEditsDataSet1.EQ_IntranetReportData.Rows.Add(myRow);

dataGridView1.CurrentCell = dataGridView1[0, row];

all is good. This will get you a place to start adding data from the copy.

GEE I thought these were supposed to be connected? But they are a pain So I add new data to the DataRow and simultaneously add data to the Grids Cells on that row. Do my update and accept and it works.. EXCEPT when you use a filter. Then it all goes bad.

So you must take save all filters and sorts then put em back later.

All in all 3 normal days.. Now that was what I call a RAD tool.Hmm

Rant Mode off.

C# Front end for MRS

Hi
I'm a complete newbie to C# and Rep Services, however i have a report
running on my localhost via a Web application created in C#. All fairly
simple stuff so far.
What I cannot get right is a simple task of setting, say, one of the Report
params from within the C# code. In other words, i don't want to use the
param front end Rep Services provides.
Does anyone have links or code samples that show a simple web application
providing param inputs with a "run" button that goes off and launches the RS
Report?
Thanks
MikeRS works as a Web Service - so you need to add the appropriate web reference
to your C# application, then read up on the API. The sample app
FindRenderSave includes code to create a useful wrapper class to invoke
reports.
brian
"Mike" <mike.cornell@.interactivesa.co.za> wrote in message
news:#zBhmuErEHA.536@.TK2MSFTNGP11.phx.gbl...
> Hi
> I'm a complete newbie to C# and Rep Services, however i have a report
> running on my localhost via a Web application created in C#. All fairly
> simple stuff so far.
> What I cannot get right is a simple task of setting, say, one of the
Report
> params from within the C# code. In other words, i don't want to use the
> param front end Rep Services provides.
> Does anyone have links or code samples that show a simple web application
> providing param inputs with a "run" button that goes off and launches the
RS
> Report?
> Thanks
> Mike
>

Sunday, February 19, 2012

C# / Sql Server question

I am a newbie at C# (VS 2005) and SQL Server(2003). I was able to create a
db using my old pc and then copied it to my laptop to my project folder, I
cannot connect to it nor can i create a db on my laptop. I belive its an
access issue but I don't know what to do.

When i go into Enterprise Manager it shows a red dot for (local) and when i
try to connect(click) to it i get the following:

A connection could nto be established to (local)
Reason: SQL Server does not exist or access denied
ConnectionOpen (Connect ())
Please verify SQL Server is running and check your SQL Server registration
properties

any suggestions as what to try?

I am ultimately trying to connect to the db i created on my old pc
(terminology used to distinguish the 2). Both have XP SP2 installed.

I would also like to create dbs but i believe once this issue is fixed i
should be able to.

Any help is greatly appreciated... remember i am new at this :)

Mark

if this is the wrong group please forgive me and please point me to the
correct one.M K (ski_freakREMOVETHECAPS@.yahoo.com) writes:
> I am a newbie at C# (VS 2005) and SQL Server(2003).

There is no SQL Server 2003. Since you talk about Enterprise Manager,
I assume that you mean SQL Server 2000.

> When i go into Enterprise Manager it shows a red dot for (local) and
> when i try to connect(click) to it i get the following:
> A connection could nto be established to (local)
> Reason: SQL Server does not exist or access denied
> ConnectionOpen (Connect ())
> Please verify SQL Server is running and check your SQL Server registration
> properties
> any suggestions as what to try?

The red dot means that SQL Server is not running, so you need to start
it first.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||As i said below i tried to connect. Yes its SQL Server 2000 my bad

"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns97BDF05838506Yazorman@.127.0.0.1...
>M K (ski_freakREMOVETHECAPS@.yahoo.com) writes:
>> I am a newbie at C# (VS 2005) and SQL Server(2003).
> There is no SQL Server 2003. Since you talk about Enterprise Manager,
> I assume that you mean SQL Server 2000.
>> When i go into Enterprise Manager it shows a red dot for (local) and
>> when i try to connect(click) to it i get the following:
>>
>> A connection could nto be established to (local)
>> Reason: SQL Server does not exist or access denied
>> ConnectionOpen (Connect ())
>> Please verify SQL Server is running and check your SQL Server
>> registration
>> properties
>>
>> any suggestions as what to try?
> The red dot means that SQL Server is not running, so you need to start
> it first.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pr...oads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodin...ions/books.mspx|||> As i said below i tried to connect.

SQL Server normally runs as a service so you need to *start* it before you
try to connect. Right click on the server node and select 'Start'. If the
service fails to start, you should have related messages in the Windows or
SQL Server logs.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Mark Kopple" <ski_freak@.earthlink.net> wrote in message
news:JlS7g.366$Jf.316@.newsread4.news.pas.earthlink .net...
> As i said below i tried to connect. Yes its SQL Server 2000 my bad
> "Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
> news:Xns97BDF05838506Yazorman@.127.0.0.1...
>>M K (ski_freakREMOVETHECAPS@.yahoo.com) writes:
>>> I am a newbie at C# (VS 2005) and SQL Server(2003).
>>
>> There is no SQL Server 2003. Since you talk about Enterprise Manager,
>> I assume that you mean SQL Server 2000.
>>
>>> When i go into Enterprise Manager it shows a red dot for (local) and
>>> when i try to connect(click) to it i get the following:
>>>
>>> A connection could nto be established to (local)
>>> Reason: SQL Server does not exist or access denied
>>> ConnectionOpen (Connect ())
>>> Please verify SQL Server is running and check your SQL Server
>>> registration
>>> properties
>>>
>>> any suggestions as what to try?
>>
>> The red dot means that SQL Server is not running, so you need to start
>> it first.
>>
>>
>> --
>> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>>
>> Books Online for SQL Server 2005 at
>> http://www.microsoft.com/technet/pr...oads/books.mspx
>> Books Online for SQL Server 2000 at
>> http://www.microsoft.com/sql/prodin...ions/books.mspx|||Ahh i found it (dont know why i didnt see it in the first place) but when i
click on it nothing happens and it doesnt start.

i then tried to delete it which worked. When i tried to add it back there
was no option for (local) just my computer name. I then tried to use it and
it said login failed for 'COMPUTERNAME\Guest'

The actual computer name is HOMEPC

I no longer have (local) in the list
I tried adding back (local) and got the following - SQL Server does not
exist or access denied.ConnectionOpen(Connect())

"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:lfT7g.70018$F_3.26304@.newssvr29.news.prodigy. net...
>> As i said below i tried to connect.
> SQL Server normally runs as a service so you need to *start* it before you
> try to connect. Right click on the server node and select 'Start'. If
> the service fails to start, you should have related messages in the
> Windows or SQL Server logs.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Mark Kopple" <ski_freak@.earthlink.net> wrote in message
> news:JlS7g.366$Jf.316@.newsread4.news.pas.earthlink .net...
>> As i said below i tried to connect. Yes its SQL Server 2000 my bad
>>
>> "Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
>> news:Xns97BDF05838506Yazorman@.127.0.0.1...
>>>M K (ski_freakREMOVETHECAPS@.yahoo.com) writes:
>>>> I am a newbie at C# (VS 2005) and SQL Server(2003).
>>>
>>> There is no SQL Server 2003. Since you talk about Enterprise Manager,
>>> I assume that you mean SQL Server 2000.
>>>
>>>> When i go into Enterprise Manager it shows a red dot for (local) and
>>>> when i try to connect(click) to it i get the following:
>>>>
>>>> A connection could nto be established to (local)
>>>> Reason: SQL Server does not exist or access denied
>>>> ConnectionOpen (Connect ())
>>>> Please verify SQL Server is running and check your SQL Server
>>>> registration
>>>> properties
>>>>
>>>> any suggestions as what to try?
>>>
>>> The red dot means that SQL Server is not running, so you need to start
>>> it first.
>>>
>>>
>>> --
>>> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>>>
>>> Books Online for SQL Server 2005 at
>>> http://www.microsoft.com/technet/pr...oads/books.mspx
>>> Books Online for SQL Server 2000 at
>>> http://www.microsoft.com/sql/prodin...ions/books.mspx
>>
>>|||Oops again. HOMEPC is not the same computer, i did try using the MKLAPTOP
which IS the current computer name . I got the same message using
MKLAPTOP - SQL Server does not exist...

"Mark Kopple" <ski_freak@.earthlink.net> wrote in message
news:BIZ7g.443$y4.256@.newsread2.news.pas.earthlink .net...
> Ahh i found it (dont know why i didnt see it in the first place) but when
> i click on it nothing happens and it doesnt start.
> i then tried to delete it which worked. When i tried to add it back there
> was no option for (local) just my computer name. I then tried to use it
> and it said login failed for 'COMPUTERNAME\Guest'
> The actual computer name is HOMEPC
> I no longer have (local) in the list
> I tried adding back (local) and got the following - SQL Server does not
> exist or access denied.ConnectionOpen(Connect())
> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
> news:lfT7g.70018$F_3.26304@.newssvr29.news.prodigy. net...
>>> As i said below i tried to connect.
>>
>> SQL Server normally runs as a service so you need to *start* it before
>> you try to connect. Right click on the server node and select 'Start'.
>> If the service fails to start, you should have related messages in the
>> Windows or SQL Server logs.
>>
>> --
>> Hope this helps.
>>
>> Dan Guzman
>> SQL Server MVP
>>
>> "Mark Kopple" <ski_freak@.earthlink.net> wrote in message
>> news:JlS7g.366$Jf.316@.newsread4.news.pas.earthlink .net...
>>> As i said below i tried to connect. Yes its SQL Server 2000 my bad
>>>
>>> "Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
>>> news:Xns97BDF05838506Yazorman@.127.0.0.1...
>>>>M K (ski_freakREMOVETHECAPS@.yahoo.com) writes:
>>>>> I am a newbie at C# (VS 2005) and SQL Server(2003).
>>>>
>>>> There is no SQL Server 2003. Since you talk about Enterprise Manager,
>>>> I assume that you mean SQL Server 2000.
>>>>
>>>>> When i go into Enterprise Manager it shows a red dot for (local) and
>>>>> when i try to connect(click) to it i get the following:
>>>>>
>>>>> A connection could nto be established to (local)
>>>>> Reason: SQL Server does not exist or access denied
>>>>> ConnectionOpen (Connect ())
>>>>> Please verify SQL Server is running and check your SQL Server
>>>>> registration
>>>>> properties
>>>>>
>>>>> any suggestions as what to try?
>>>>
>>>> The red dot means that SQL Server is not running, so you need to start
>>>> it first.
>>>>
>>>>
>>>> --
>>>> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>>>>
>>>> Books Online for SQL Server 2005 at
>>>> http://www.microsoft.com/technet/pr...oads/books.mspx
>>>> Books Online for SQL Server 2000 at
>>>> http://www.microsoft.com/sql/prodin...ions/books.mspx
>>>
>>>
>>
>>|||OK I stopped and started Enterprise Manager and found this

MKLAPTOP\VAIO_VEDB (Windows NT)

I was able to start, connect and create a db. I dont think i want to use
VIAO_VEDB do i?

(local) is just above it and i still cant start it.

"Mark Kopple" <ski_freak@.earthlink.net> wrote in message
news:BIZ7g.443$y4.256@.newsread2.news.pas.earthlink .net...
> Ahh i found it (dont know why i didnt see it in the first place) but when
> i click on it nothing happens and it doesnt start.
> i then tried to delete it which worked. When i tried to add it back there
> was no option for (local) just my computer name. I then tried to use it
> and it said login failed for 'COMPUTERNAME\Guest'
> The actual computer name is HOMEPC
> I no longer have (local) in the list
> I tried adding back (local) and got the following - SQL Server does not
> exist or access denied.ConnectionOpen(Connect())
> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
> news:lfT7g.70018$F_3.26304@.newssvr29.news.prodigy. net...
>>> As i said below i tried to connect.
>>
>> SQL Server normally runs as a service so you need to *start* it before
>> you try to connect. Right click on the server node and select 'Start'.
>> If the service fails to start, you should have related messages in the
>> Windows or SQL Server logs.
>>
>> --
>> Hope this helps.
>>
>> Dan Guzman
>> SQL Server MVP
>>
>> "Mark Kopple" <ski_freak@.earthlink.net> wrote in message
>> news:JlS7g.366$Jf.316@.newsread4.news.pas.earthlink .net...
>>> As i said below i tried to connect. Yes its SQL Server 2000 my bad
>>>
>>> "Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
>>> news:Xns97BDF05838506Yazorman@.127.0.0.1...
>>>>M K (ski_freakREMOVETHECAPS@.yahoo.com) writes:
>>>>> I am a newbie at C# (VS 2005) and SQL Server(2003).
>>>>
>>>> There is no SQL Server 2003. Since you talk about Enterprise Manager,
>>>> I assume that you mean SQL Server 2000.
>>>>
>>>>> When i go into Enterprise Manager it shows a red dot for (local) and
>>>>> when i try to connect(click) to it i get the following:
>>>>>
>>>>> A connection could nto be established to (local)
>>>>> Reason: SQL Server does not exist or access denied
>>>>> ConnectionOpen (Connect ())
>>>>> Please verify SQL Server is running and check your SQL Server
>>>>> registration
>>>>> properties
>>>>>
>>>>> any suggestions as what to try?
>>>>
>>>> The red dot means that SQL Server is not running, so you need to start
>>>> it first.
>>>>
>>>>
>>>> --
>>>> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>>>>
>>>> Books Online for SQL Server 2005 at
>>>> http://www.microsoft.com/technet/pr...oads/books.mspx
>>>> Books Online for SQL Server 2000 at
>>>> http://www.microsoft.com/sql/prodin...ions/books.mspx
>>>
>>>
>>
>>|||> MKLAPTOP\VAIO_VEDB (Windows NT)

This is a named instance. You can install zero or more named instances plus
zero or one 'default' instance (server name only) on a single computer.
Each instance is independent with only the client tools shared among
instances.

It looks like you might have only a named instance installed with no default
instance. You will have an entry in Add/Programs titled 'Microsoft SQL
Server 2000' if you have a default SQL 2000 instance. Your named instance
is titled 'Microsoft SQL Server 2000 (VAIO_VEDB)'

> I was able to start, connect and create a db. I dont think i want to use
> VIAO_VEDB do i?

You should have no problem using this named instance instead of a default
instance. If you want a default instance instead, you can rerun setup.exe
to create a default instance and then uninstall the VAIO_VEDB instance
afterward.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Mark Kopple" <ski_freak@.earthlink.net> wrote in message
news:6k_7g.1893$u4.302@.newsread1.news.pas.earthlin k.net...
> OK I stopped and started Enterprise Manager and found this
> MKLAPTOP\VAIO_VEDB (Windows NT)
> I was able to start, connect and create a db. I dont think i want to use
> VIAO_VEDB do i?
> (local) is just above it and i still cant start it.
> "Mark Kopple" <ski_freak@.earthlink.net> wrote in message
> news:BIZ7g.443$y4.256@.newsread2.news.pas.earthlink .net...
>> Ahh i found it (dont know why i didnt see it in the first place) but when
>> i click on it nothing happens and it doesnt start.
>>
>> i then tried to delete it which worked. When i tried to add it back
>> there was no option for (local) just my computer name. I then tried to
>> use it and it said login failed for 'COMPUTERNAME\Guest'
>>
>> The actual computer name is HOMEPC
>>
>> I no longer have (local) in the list
>> I tried adding back (local) and got the following - SQL Server does not
>> exist or access denied.ConnectionOpen(Connect())
>>
>> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
>> news:lfT7g.70018$F_3.26304@.newssvr29.news.prodigy. net...
>>>> As i said below i tried to connect.
>>>
>>> SQL Server normally runs as a service so you need to *start* it before
>>> you try to connect. Right click on the server node and select 'Start'.
>>> If the service fails to start, you should have related messages in the
>>> Windows or SQL Server logs.
>>>
>>> --
>>> Hope this helps.
>>>
>>> Dan Guzman
>>> SQL Server MVP
>>>
>>> "Mark Kopple" <ski_freak@.earthlink.net> wrote in message
>>> news:JlS7g.366$Jf.316@.newsread4.news.pas.earthlink .net...
>>>> As i said below i tried to connect. Yes its SQL Server 2000 my bad
>>>>
>>>> "Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
>>>> news:Xns97BDF05838506Yazorman@.127.0.0.1...
>>>>>M K (ski_freakREMOVETHECAPS@.yahoo.com) writes:
>>>>>> I am a newbie at C# (VS 2005) and SQL Server(2003).
>>>>>
>>>>> There is no SQL Server 2003. Since you talk about Enterprise Manager,
>>>>> I assume that you mean SQL Server 2000.
>>>>>
>>>>>> When i go into Enterprise Manager it shows a red dot for (local) and
>>>>>> when i try to connect(click) to it i get the following:
>>>>>>
>>>>>> A connection could nto be established to (local)
>>>>>> Reason: SQL Server does not exist or access denied
>>>>>> ConnectionOpen (Connect ())
>>>>>> Please verify SQL Server is running and check your SQL Server
>>>>>> registration
>>>>>> properties
>>>>>>
>>>>>> any suggestions as what to try?
>>>>>
>>>>> The red dot means that SQL Server is not running, so you need to start
>>>>> it first.
>>>>>
>>>>>
>>>>> --
>>>>> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>>>>>
>>>>> Books Online for SQL Server 2005 at
>>>>> http://www.microsoft.com/technet/pr...oads/books.mspx
>>>>> Books Online for SQL Server 2000 at
>>>>> http://www.microsoft.com/sql/prodin...ions/books.mspx
>>>>
>>>>
>>>
>>>
>>
>>|||thanks.. it makes sense now :)

"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:KG%7g.24382$4L1.2682@.newssvr11.news.prodigy.c om...
>> MKLAPTOP\VAIO_VEDB (Windows NT)
>>
> This is a named instance. You can install zero or more named instances
> plus zero or one 'default' instance (server name only) on a single
> computer. Each instance is independent with only the client tools shared
> among instances.
> It looks like you might have only a named instance installed with no
> default instance. You will have an entry in Add/Programs titled
> 'Microsoft SQL Server 2000' if you have a default SQL 2000 instance. Your
> named instance is titled 'Microsoft SQL Server 2000 (VAIO_VEDB)'
>> I was able to start, connect and create a db. I dont think i want to use
>> VIAO_VEDB do i?
> You should have no problem using this named instance instead of a default
> instance. If you want a default instance instead, you can rerun setup.exe
> to create a default instance and then uninstall the VAIO_VEDB instance
> afterward.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Mark Kopple" <ski_freak@.earthlink.net> wrote in message
> news:6k_7g.1893$u4.302@.newsread1.news.pas.earthlin k.net...
>> OK I stopped and started Enterprise Manager and found this
>>
>> MKLAPTOP\VAIO_VEDB (Windows NT)
>>
>> I was able to start, connect and create a db. I dont think i want to use
>> VIAO_VEDB do i?
>>
>> (local) is just above it and i still cant start it.
>>
>> "Mark Kopple" <ski_freak@.earthlink.net> wrote in message
>> news:BIZ7g.443$y4.256@.newsread2.news.pas.earthlink .net...
>>> Ahh i found it (dont know why i didnt see it in the first place) but
>>> when i click on it nothing happens and it doesnt start.
>>>
>>> i then tried to delete it which worked. When i tried to add it back
>>> there was no option for (local) just my computer name. I then tried to
>>> use it and it said login failed for 'COMPUTERNAME\Guest'
>>>
>>> The actual computer name is HOMEPC
>>>
>>> I no longer have (local) in the list
>>> I tried adding back (local) and got the following - SQL Server does not
>>> exist or access denied.ConnectionOpen(Connect())
>>>
>>> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
>>> news:lfT7g.70018$F_3.26304@.newssvr29.news.prodigy. net...
>>>>> As i said below i tried to connect.
>>>>
>>>> SQL Server normally runs as a service so you need to *start* it before
>>>> you try to connect. Right click on the server node and select 'Start'.
>>>> If the service fails to start, you should have related messages in the
>>>> Windows or SQL Server logs.
>>>>
>>>> --
>>>> Hope this helps.
>>>>
>>>> Dan Guzman
>>>> SQL Server MVP
>>>>
>>>> "Mark Kopple" <ski_freak@.earthlink.net> wrote in message
>>>> news:JlS7g.366$Jf.316@.newsread4.news.pas.earthlink .net...
>>>>> As i said below i tried to connect. Yes its SQL Server 2000 my bad
>>>>>
>>>>> "Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
>>>>> news:Xns97BDF05838506Yazorman@.127.0.0.1...
>>>>>>M K (ski_freakREMOVETHECAPS@.yahoo.com) writes:
>>>>>>> I am a newbie at C# (VS 2005) and SQL Server(2003).
>>>>>>
>>>>>> There is no SQL Server 2003. Since you talk about Enterprise Manager,
>>>>>> I assume that you mean SQL Server 2000.
>>>>>>
>>>>>>> When i go into Enterprise Manager it shows a red dot for (local) and
>>>>>>> when i try to connect(click) to it i get the following:
>>>>>>>
>>>>>>> A connection could nto be established to (local)
>>>>>>> Reason: SQL Server does not exist or access denied
>>>>>>> ConnectionOpen (Connect ())
>>>>>>> Please verify SQL Server is running and check your SQL Server
>>>>>>> registration
>>>>>>> properties
>>>>>>>
>>>>>>> any suggestions as what to try?
>>>>>>
>>>>>> The red dot means that SQL Server is not running, so you need to
>>>>>> start
>>>>>> it first.
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>>>>>>
>>>>>> Books Online for SQL Server 2005 at
>>>>>> http://www.microsoft.com/technet/pr...oads/books.mspx
>>>>>> Books Online for SQL Server 2000 at
>>>>>> http://www.microsoft.com/sql/prodin...ions/books.mspx
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>

Tuesday, February 14, 2012

Button to close reports

Stupid newbie question of the day: is there a way to embed a button to close
the opened report?It's actually not a stupid newbie question :) You could add a button that
calls some code to do this but what happens when the user exports it to PDF,
Excel, etc? I assume you want to close the browser viewing the report?
Tom
This posting is provided "AS IS" with no warranties, and confers no rights.
"Casey" <coronaride@.yahoo.com> wrote in message
news:eoXV%23OJgEHA.3192@.tk2msftngp13.phx.gbl...
> Stupid newbie question of the day: is there a way to embed a button to
> close
> the opened report?
>