|
Thanks Paul .
Can this property be checked from the main report?
I don't know how to refer the subreport from the main report...Like ReportItems!txtbox1 is there options for referring to a subreport also?
It will be really helpful if u could help me out with some examples as i am coming across this for the first time.
Cheers
Payal
|
|
|
|
|
Ok, I'm tried and I'm making mistakes, but for the life of me I don't see what's wrong with the following sproc. I even ran it and then tried an external Select @@Identity which did return a value, but not the sproc.
SPROC:
@CourseNumber int OUTPUT,
@CourseName nvarchar(100),
@College int,
@Department int,
@Description nvarchar(500)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
INSERT INTO Course
(CourseName, College, Department,Description)
VALUES
(@CourseName, @College, @Department,@Description)
SELECT @CourseNumber = @@IDENTITY
"Every time Lotus Notes starts up, somewhere a puppy, a kitten, a lamb, and a baby seal are killed. Lotus Notes is a conspiracy by the forces of Satan to drive us over the brink into madness. The CRC-32 for each file in the installation includes the numbers 666." Gary Wheeler
"The secret to a long and healthy life is simple. Don't get ill and don't die." Pete O'Hanlon, courtesy of Rama
"I realised that all of my best anecdotes started with "So there we were, pissed". Pete O'Hanlon
|
|
|
|
|
Does table Course contain any columns where the IDENTITY property is true?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Yes it does, the CourseNumber column.
Anyways, it works now. I restarted the DB and now it works. Go figure. Thanks though
"Every time Lotus Notes starts up, somewhere a puppy, a kitten, a lamb, and a baby seal are killed. Lotus Notes is a conspiracy by the forces of Satan to drive us over the brink into madness. The CRC-32 for each file in the installation includes the numbers 666." Gary Wheeler
"The secret to a long and healthy life is simple. Don't get ill and don't die." Pete O'Hanlon, courtesy of Rama
"I realised that all of my best anecdotes started with "So there we were, pissed". Pete O'Hanlon
|
|
|
|
|
Hi, I have a table that contains a column of type XML, and an XSL style sheet is stored within these. Inside each XSL, there is a value called TargetURL - which I would like to update to URL. The text replace function does not work with XML, and I did not find anything in google. Does anyone know how this can be done?
|
|
|
|
|
"An Error has occured whilst establishing a connection to the server.When connecting to sqlserver 2005, this failure may be caused by the fact under default settings SQL Server does not allow remote connections.(Provider: named pipes; error 40-Could not open connection to sql server"
Hi All
i am getting the above error when i am trying to retrieve data from sql 2005.
i have created my project in vs2005.
my connection string = "Data Source=.;Initial Catalog=MYDB;Persist Security Info=True;User ID=sa;Password=sa"
i have already enabled all my Sqlexpress protocols and enabled remote connection in the management express.
do you have any ideas on how to solve this.
p.s. the program works fine if i create an odbc to the db but i dont want to use an odbc.
thanks
Anoop Brijmohun
|
|
|
|
|
Hi Anoop,
Please follow the below mentioned steps:
Step 1) Make sure SQL SERVER is up and the instance you try to connect is running.
Step 2) Your system Firewall should not block SQL Server port.
Step 3) Go to Computer Management >> Service and Application >> SQL Server 2005 Configuration >> Network Configuration
Enable TCP/IP protocol. Make sure that SQL SERVER port is by Default 1433.
Step 4) Now follow this KB Article of MSDN depending on your server : http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277
You may also take a look at the following link of Microsoft Forum.
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=147346&SiteID=1[^]
I hope this helps .
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
Hi John
Thanks for you suggestions...
i tried those but still didn't work..
after some investigation i discovered that the connectionstring was not correct.
it should have read...
"Data Source=ANOOPNB\SQLEXPRESS;Initial Catalog=MYDB;Persist Security Info=True;User ID=sa;Password=sa"i used the vs2005 wizard under the settings menu to get this.
this solved the problem for me...
thank you so much though!
Anoop
|
|
|
|
|
I am working on a project that generates reports via SSRS, and i am having the following problem. for the LoadReport method, i am using "/temp" for the report path. i have placed a "temp" folder every place on the server i can imagine to help the service "find" it, but I keep getting this error:
The item '/temp' cannot be found. ---> The item '/temp' cannot be found.
here is the stack trace:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. <br />
<br />
Exception Details: System.Web.Services.Protocols.SoapException: The item '/temp' cannot be found. ---> The item '/temp' cannot be found.<br />
<br />
Source Error: <br />
<br />
<br />
Line 227: [return: System.Xml.Serialization.XmlElementAttribute("executionInfo")]<br />
Line 228: public ExecutionInfo LoadReport(string Report, string HistoryID) {<br />
Line 229: object[] results = this.Invoke("LoadReport", new object[] {<br />
Line 230: Report,<br />
Line 231: HistoryID});<br />
<br />
<br />
<br />
<br />
Stack Trace: <br />
<br />
<br />
[SoapException: The item '/temp' cannot be found. ---> The item '/temp' cannot be found.]<br />
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +551452<br />
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +204<br />
<br />
<br />
ANy idea? This is my SSRS project, and outside of this little roadblock, it is moving along beautifully.
______________________
Mr Griffin, eleventy billion is not a number...
|
|
|
|
|
The report path should be the full path to the report relative to the root folder, including the name of the report itself. You appear to have just specified the name of the folder the report resides in and not the name of the report itself. If you don't specify the name of the report, how can the report server know what report you want to load?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hi,
I'm exporting my report to Excel and there are colums missing ! Specifically columns where visibility is conditional. I can see them on the server, where they appear and disappear corrdctly. Is excel just copying each page or is it trying to be cleverer than that?
I just want what I can see exporting to Excel, that's not what is happening.
Thanks in Advance.
Harvey
|
|
|
|
|
how to insert null to an EMPTY cell in SQL SERVER...
i.e, in a field, i enter some values and deleted it. so, it is considered as EMPTY field and not null. i need a query to make that field <NULL>
can anyone help me? - KARAN
|
|
|
|
|
UPDATE <tablename> <br />
SET <col> = NULL <br />
WHERE LEN(<col>) = 0 </col></col></tablename>
this works for string data
even recollect reading IsEmpty() function in SQL Server
you may even try with this. I've never used this function.
Regards
KP
|
|
|
|
|
UPDATE TableA SET ColA = NULL <br />
WHERE LEN(ColA) = 0 <br />
this works for string data
even recollect reading IsEmpty() function in SQL Server
you may even try with this. I've never used this function.
Regards
KP
|
|
|
|
|
thanks a lot krish-KP... can i have it for DATETIME field also? i.e.. when the DATETIME field is EMPTY or 1/1/1900, it should be of <null>. how to achieve it? - KARAN
|
|
|
|
|
This solution is when you are manually putting data in the fields rom enterprise manager.
Just click on the cell and do " control 0 ".
That is press control key and zero.
this will get NULL value in the empty field.
-Naina
--Here 2 See Sharp--
I have not failed. I've just found 10,000 ways that won't work.
|
|
|
|
|
thanks seesharp...but i need it programmatically
|
|
|
|
|
Hi,
I have a requirement to select the starting date and ending date of a month if I give a particular date as a parameter. HOw to do that? For eg>
If I give the select statement as below:
select startdate, enddate from <tablename> where particulardate = '17/03/2008'. If I execute this query, I should get the start date as '01/03/2008' and end date as '31/03/2008'
HOw to achieve this in SQL Server? Pls help
Regards
meeram.
Meeram395
|
|
|
|
|
Getting End Date
1. Add 1month to the given date taking 1st day and year of given date
2. which returns 1st of next month from given date
3. subtract 1day which returns last day of given month
DECLARE @GivenDate AS DateTime<br />
SET @GivenDate = GetDate()<br />
SELECT DateAdd(DD, -1, DateAdd(MM, 1, Cast(Month(@GivenDate) AS VarChar(2)) + '/01/' + Cast(Year(@GivenDate) AS VarChar(4))))
Getting Start date
similar to the end date take day as 1 with month & year from given date
Regards
KP
|
|
|
|
|
Thank you very much
Meeram395
|
|
|
|
|
hi,
i have three fields in the database table
p1 p2 rank
10% 20% 3
21% 40% 2
now i am passing the input as 15%...this 15% is related to 3rd rank.. so i need the o/p rank as 3..
if the p1 and p2 datatypes are varchar..then how we can we write the query for that one tgo get the rank as 3.
Ramesh
|
|
|
|
|
You haven't explained why a rank of 3 should be returned for 15% However I assume this is because 15% is between 10 and 20%. In this case, you shoul use the BETWEEN clause in your query.
Why are you storing percentages in varchar fields? They are numbers, so they should be stored in numeric fields. You will run into problems every time you want to do numeric comparisons because you will need to case your varchar values to numbers.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
select rank from table where input between P1 and P2
--Here 2 See Sharp--
I have not failed. I've just found 10,000 ways that won't work.
|
|
|
|
|
Hello..
I've got an InvalidOperationException: invalid Value vor the OracleObjectMappingAttribute nNR
Could NET have a problem with casting NUMBER to int? Or have i to do something
special, because I'm using a OUT-only Parameter?
Here are my code:
PLSQL:
-------------
create type TESTOBJ as OBJECT (
nNR NUMBER;
sTEXT VARCHAR2(20);
)
create testproc(p_testobj OUT TESTOBJ)
as
v_testobj TESTOBJ := TESTOBJ(1,'Test');
begin
p_testobj := v_testobj;
end;
C# the Mapped OBj:
-------------------------------
public class OracleXTBQueueObj : IOracleCustomType
{
private int nr;
[OracleObjectMappingAttribute("nNR")]
public int NR {
get { return nr; }
set { nr = value; }
}
private string tEXT;
[OracleObjectMappingAttribute("sTEXT")]
public string TEXT
{
get { return tEXT; }
set { tEXT = value; }
}
public virtual void FromCustomObject(OracleConnection con, IntPtr pUdt)
{
OracleUdt.SetValue(con, pUdt, "nNR", this.NR);
OracleUdt.SetValue(con, pUdt, "sTEXT", this.TEXT);
}
public virtual void ToCustomObject(OracleConnection con, IntPtr pUdt)
{
this.NR = ((int)(OracleUdt.GetValue(con, pUdt, "nNR")));
this.TEXT = ((string)(OracleUdt.GetValue(con, pUdt, "sTEXT")));
}
}
C# the Factory:
-------------------------------
[OracleCustomTypeMappingAttribute("USR.TESTOBJ")]
public class OracleXTBQueueObjFactory : IOracleCustomTypeFactory
{
public IOracleCustomType CreateObject()
{
OracleXTBQueueObj obj = new OracleXTBQueueObj();
return obj;
}
}
C# the function, callin the PROCEDURE:
------------------------------------------------------------
public static void GetOO(OracleConnection conn)
{
OracleCommand cmd = new OracleCommand("UDT_TESTPROC", conn);
cmd.CommandType = System.Data.CommandType.StoredProcedure;
OracleParameter paramDaten = new OracleParameter("p_testobj", OracleDbType.Object, ParameterDirection.Output);
paramDaten.UdtTypeName = "USR.TESTOBJ";
cmd.Parameters.Add(paramDaten);
try { cmd.ExecuteNonQuery(); }
catch (Exception ex) //InvalidOperationException
{
Console.Out.WriteLine(ex.Message)
}
Console.In.ReadLine();
paramDaten.Value.ToString();
}
-----
Hope somebody can help me
thx in advance
faehne
|
|
|
|
|
I am working on a report which requires me to draw two polygons (rectangles) on a scatter chart to visually indicate "good" and "bad" ranges of plotted data. Is there a way to do this out-of-the-box?
Otherwise, if I must create a custom report item, how do I draw on the chart surface? I have looked at the following articles on Custom Report Items, but when I open the sample solutions I can't put the custom report items on the chart surface.
http://blogs.msdn.com/chrishays/default.aspx
[^]
http://msdn2.microsoft.com/en-us/magazine/cc188686.aspx[^]
Do I have to create a custom report item which inherits from a chart control? If so, does anyone have any reference samples?
|
|
|
|