Wednesday, March 28, 2012
How to save the parameters to a RS report
Company Code, Plant, Movement type, GL Accounts, Period, Material type,
Material,etc.
Sometimes each user runs the report with the same selection except that
they change something like the period for which the report is run. Is
there a way we can provide a mechanism to the users to save the
parameters for the reports and retrieve the parameter settings for a
report and modify and run them. We can do this in Business objects.
Thanks
Kareni think you are looking for the subscriptions feature in Report Manager.
Click on a report. Next click "subscriptions" near the top. You can now
setup a subscription with different parameters.
Taz
"KarenM" <karenmiddleol@.yahoo.com> wrote in message
news:1158489967.873086.53010@.d34g2000cwd.googlegroups.com...
>I have several RS reports which have a number of parameters like
> Company Code, Plant, Movement type, GL Accounts, Period, Material type,
> Material,etc.
> Sometimes each user runs the report with the same selection except that
> they change something like the period for which the report is run. Is
> there a way we can provide a mechanism to the users to save the
> parameters for the reports and retrieve the parameter settings for a
> report and modify and run them. We can do this in Business objects.
> Thanks
> Karen
>|||Hi Tarun,
No I know of subscriptions that is when I expect the report to run in
background. What I am looking for is if users run the same report many
times with a specific parameters it is not convenient for them to type
them everytime they would like to save the parameters and retrieve and
use them
Thanks
Karen
Tarun Mistry wrote:
> i think you are looking for the subscriptions feature in Report Manager.
> Click on a report. Next click "subscriptions" near the top. You can now
> setup a subscription with different parameters.
> Taz
>
> "KarenM" <karenmiddleol@.yahoo.com> wrote in message
> news:1158489967.873086.53010@.d34g2000cwd.googlegroups.com...
> >I have several RS reports which have a number of parameters like
> > Company Code, Plant, Movement type, GL Accounts, Period, Material type,
> > Material,etc.
> >
> > Sometimes each user runs the report with the same selection except that
> > they change something like the period for which the report is run. Is
> > there a way we can provide a mechanism to the users to save the
> > parameters for the reports and retrieve the parameter settings for a
> > report and modify and run them. We can do this in Business objects.
> >
> > Thanks
> > Karen
> >|||This is not a feature that is included in the product.
We created a system that did this. The first step is that you have to
create your own Visual Studio application that you will use for
reporting, probably including a ReportViewer control.
You would create your own fields on the screen to accept these
parameters.
Then you would have to create a system for saving the reports.
We collected all the paramters into an xml string and saved it to a
table, along with a userID and a name the user gave to the particular
parameter set.
KarenM wrote:
> Hi Tarun,
> No I know of subscriptions that is when I expect the report to run in
> background. What I am looking for is if users run the same report many
> times with a specific parameters it is not convenient for them to type
> them everytime they would like to save the parameters and retrieve and
> use them
> Thanks
> Karen
> Tarun Mistry wrote:
> > i think you are looking for the subscriptions feature in Report Manager.
> >
> > Click on a report. Next click "subscriptions" near the top. You can now
> > setup a subscription with different parameters.
> >
> > Taz
> >
> >
> > "KarenM" <karenmiddleol@.yahoo.com> wrote in message
> > news:1158489967.873086.53010@.d34g2000cwd.googlegroups.com...
> > >I have several RS reports which have a number of parameters like
> > > Company Code, Plant, Movement type, GL Accounts, Period, Material type,
> > > Material,etc.
> > >
> > > Sometimes each user runs the report with the same selection except that
> > > they change something like the period for which the report is run. Is
> > > there a way we can provide a mechanism to the users to save the
> > > parameters for the reports and retrieve the parameter settings for a
> > > report and modify and run them. We can do this in Business objects.
> > >
> > > Thanks
> > > Karen
> > >|||That is exactly what we are after. Could you kindly share the code for
the same. It is such a vital requirement for users I am surprised that
Microsoft missed including this in one of the RS support packs.
Thanks
Karen
cowznofsky wrote:
> This is not a feature that is included in the product.
> We created a system that did this. The first step is that you have to
> create your own Visual Studio application that you will use for
> reporting, probably including a ReportViewer control.
> You would create your own fields on the screen to accept these
> parameters.
> Then you would have to create a system for saving the reports.
> We collected all the paramters into an xml string and saved it to a
> table, along with a userID and a name the user gave to the particular
> parameter set.
> KarenM wrote:
> > Hi Tarun,
> >
> > No I know of subscriptions that is when I expect the report to run in
> > background. What I am looking for is if users run the same report many
> > times with a specific parameters it is not convenient for them to type
> > them everytime they would like to save the parameters and retrieve and
> > use them
> >
> > Thanks
> > Karen
> > Tarun Mistry wrote:
> > > i think you are looking for the subscriptions feature in Report Manager.
> > >
> > > Click on a report. Next click "subscriptions" near the top. You can now
> > > setup a subscription with different parameters.
> > >
> > > Taz
> > >
> > >
> > > "KarenM" <karenmiddleol@.yahoo.com> wrote in message
> > > news:1158489967.873086.53010@.d34g2000cwd.googlegroups.com...
> > > >I have several RS reports which have a number of parameters like
> > > > Company Code, Plant, Movement type, GL Accounts, Period, Material type,
> > > > Material,etc.
> > > >
> > > > Sometimes each user runs the report with the same selection except that
> > > > they change something like the period for which the report is run. Is
> > > > there a way we can provide a mechanism to the users to save the
> > > > parameters for the reports and retrieve the parameter settings for a
> > > > report and modify and run them. We can do this in Business objects.
> > > >
> > > > Thanks
> > > > Karen
> > > >
Monday, March 26, 2012
How to save Hash Value on the SQL Server?
How to save Hash Value on the SQL Server?
What SQL Server data type to use?
Hash Value looks like: {19,55,198,12,420,13,36,107,109,25,82,23,510,552,931,996,478,442,130,200}
Shomer @. http://www.xtremejewelery.com
http://www.xtremejewelery.com/watches/specials/
--
From: Shomer
HiThe best way to store the hash value is to use varbinary data type. If you have a binary representation, you can probably use that to store it directly. If all you have is a representation similar to that above, you can probably use two bytes to represent each of the integers in the sequence.
- Christian
how to save a rtf file into a field
table? In Access, I am able to do that by assigning the data type OLE Object
and I go to Insert -> Oject and browse to the file I want to store in the
field. But I can not do that way in SQL Server. I guess I would declare the
SQL server data type Image. However, I am stuck on how to store an object in
this field.
Also, assume I can store such an object like that (i.e., a rtf file), can I
declare a record set and manupulate that field to my way?
Thank you for your help in advance.you have to convert to and from a byte[]
This will help
http://www.eggheadcafe.com/PrintSea...asp?LINKID=799
Robbe Morris - 2004/2005 Microsoft MVP C#
http://robbemorris.blogspot.com
"Tim" <Tim@.discussions.microsoft.com> wrote in message
news:E3B6B2BA-5B31-4A4C-95DF-C7250E7BE49A@.microsoft.com...
> Can you show me how to save a rtf file into a field in the SQL Server 2K
> table? In Access, I am able to do that by assigning the data type OLE
> Object
> and I go to Insert -> Oject and browse to the file I want to store in the
> field. But I can not do that way in SQL Server. I guess I would declare
> the
> SQL server data type Image. However, I am stuck on how to store an object
> in
> this field.
> Also, assume I can store such an object like that (i.e., a rtf file), can
> I
> declare a record set and manupulate that field to my way?
> Thank you for your help in advance.|||Hi Robbe:
Thank you for your response. Can you please tell me more about this? I am a
newbie and I don't understand what you mean, i.e., What is the byte array?
Also, I am familiar with VB. Can I use VB for this issue?
Thank you for your help.
"Robbe Morris [C# MVP]" wrote:
> you have to convert to and from a byte[]
> This will help
> http://www.eggheadcafe.com/PrintSea...asp?LINKID=799
> --
> Robbe Morris - 2004/2005 Microsoft MVP C#
> http://robbemorris.blogspot.com
>
>
> "Tim" <Tim@.discussions.microsoft.com> wrote in message
> news:E3B6B2BA-5B31-4A4C-95DF-C7250E7BE49A@.microsoft.com...
>
>sql
Monday, March 19, 2012
How to return text data type from stored procedure.
I am having one stored procedure which is returing parameter having
text data type.
This paramter has to take value from table which have column with
datatype as text.
How will i set value to parameter having text datatype to value
present in table?
Any help will be truely appreciated.> I am having one stored procedure which is returing parameter having
> text data type.
> This paramter has to take value from table which have column with
> datatype as text.
> How will i set value to parameter having text datatype to value
> present in table?
You would just SELECT it, not set it to a variable. You can't have a
variable of type TEXT. And you can't RETURN anything other than an INT, so
I assume you meant OUTPUT, not RETURN.
In SQL Server 2005 you can use VARCHAR(MAX) which is a first-class
citizen -- meaning you can DECLARE @.foo VARCHAR(MAX) and proceed with
storing 2GB of text in there if you want.
A|||> I am having one stored procedure which is returing parameter having
> text data type.
You can't return anything but an INT, and it is *NOT* meant to return
*DATA* -- return values are meant to return error/status. Single data
elements that are not part of a resultset should be "returned" via an OUTPUT
parameter.
And you can't store TEXT as a local variable... maybe you could use
VARCHAR(MAX) in SQL Server 2005. Otherwise all you can do is SELECT
TextColumn FROM table and have the application consume the result that way.
--
Aaron Bertrand
SQL Server MVP
http://www.sqlblog.com/
http://www.aspfaq.com/5006
Monday, March 12, 2012
How to return text data type from stored procedure.
I am having one stored procedure which is returing parameter having
text data type.
This paramter has to take value from table which have column with
datatype as text.
How will i set value to parameter having text datatype to value
present in table?
Any help will be truely appreciated.> I am having one stored procedure which is returing parameter having
> text data type.
You can't return anything but an INT, and it is *NOT* meant to return
*DATA* -- return values are meant to return error/status. Single data
elements that are not part of a resultset should be "returned" via an OUTPUT
parameter.
And you can't store TEXT as a local variable... maybe you could use
VARCHAR(MAX) in SQL Server 2005. Otherwise all you can do is SELECT
TextColumn FROM table and have the application consume the result that way.
Aaron Bertrand
SQL Server MVP
http://www.sqlblog.com/
http://www.aspfaq.com/5006
How to return FTS results from varchar(MAX) or Text data type column?
I am unable to get FTS working where the column to be searched is type varchar(MAX) or Text. I can get this to work if my column to be indexed is some statically assigned array size such as varchar(1000).
For instance this works, and will return all applicable results.
CREATE TABLE [dbo].[TestHtml](
[ID] [int] IDENTITY(1,1) NOT NULL,
[PageText] [varchar](1000) NOT NULL,
CONSTRAINT [PK_TestHtml] PRIMARY KEY CLUSTERED
SELECT * FROM TestHTML WHERE Contains(PageText, @.searchterm);
And this does not. It returns zero results what so ever.
CREATE TABLE [dbo].[TestHtml](
[ID] [int] IDENTITY(1,1) NOT NULL,
[PageText] [varchar](MAX) NOT NULL,
CONSTRAINT [PK_TestHtml] PRIMARY KEY CLUSTERED
SELECT * FROM TestHTML WHERE Contains(PageText, @.searchterm);
Could someone please tell me what I need to do to enable FTS on varchar(MAX) or Text columns?
Did you create a fulltext index on the column and made it language specific / language neutral ?
Jens K. Suessmeyer
http://www.sqlserver2005.de
Wednesday, March 7, 2012
How to retrieve the GUID value of a SQL NewID() identity column after an insert ?
In my table, i've a GUID column type. I insert a new record with NewID() function in Sql request.
Is it possible to retreive the GUID column of this new record (without requerying the table) ?
I'm using EVC, Sql Mobile 3.0 and OLE DB interface.
Thanks in advance.
no, you have to turn around and requery the database. another option if you are using CF2 is to create the GUID in your mobile app code and use it in your INSERT statement instead of NewID(). Then you know what it is without the extra database roundtrip.
-Darren
How to retrieve the GUID value of a SQL NewID() identity column after an insert ?
In my table, i've a GUID column type. I insert a new record with NewID() function in Sql request.
Is it possible to retreive the GUID column of this new record (without requerying the table) ?
I'm using EVC, Sql Mobile 3.0 and OLE DB interface.
Thanks in advance.
no, you have to turn around and requery the database. another option if you are using CF2 is to create the GUID in your mobile app code and use it in your INSERT statement instead of NewID(). Then you know what it is without the extra database roundtrip.
-Darren
How to Retrieve Next Value from Field?
I have a table with a column called SRGTE_KEY_1 which is also referenced as an index with an Index name of EMDET_i0. The Data Type is Varbinary.
I have a trigger when activated inserts data into this table. However my problem is that I need to determine what is the next available Varbinary value in the SRGTE_KEY_1 column so I can use this value with my Insert otherwise the trigger will Fail if I dont specify a Unique Value.
What SQL statement/s can I write to be able to obtain the next Unique Value from this Column.
A Step by Step procedure would be great as well as syntax. Thanks for your help.
Regards
AnthonyWhat do you mean by the next available value?
If you mean treat it like an integer and add 1 then maybe it shouldn't be a varbinary.
Or do you have a tabe which gives the available values?|||By the next available value I mean any value that is not being used(thats what I mean by next available) so duplication wont occur. I'm not sure how to obtain this as its varbinary. I wouldn't have a problem if it was a numeric value, but I don't know about this data type.
Friday, February 24, 2012
How to retrieve DATETIME format?
My table has a column that is DATETIME data type. The original format likes "1/21/2004". I want to check data lengh. However when I read the data by SELECT, SQL Server change the format to "Jan.-21-2004" automatically. Does any one has an idea to keep original datetime format? Thanks.
ZYTthere is no original format
you may use a format for input that sql server understands, but internally, the date is stored as an integer (number of days since the base date)
check out BOL (Books Online) for details
if you want to see a specific format when you SELECT a datatime value, then use the CONVERT function
HOW to Retrieve an image from sql server and display it in ASP.net using "imagemap or image
Ok, the problem is that , i have a field called "Attach" in sql of type image, when selecting it , the field is getting data of type BYTE(). which am being unable to display them on an Image on the panel.
using the following vb.net code:
'Dim sel2 As String
'Dim myCom As SqlCommand
'Dim conn As New SqlConnection
'Dim drr As SqlDataReader
'Dim image As System.Drawing.Image
'sel2 = "select * from attach where att_desc = '" & DropDownList1.SelectedItem().Text & "' and doc_code = " & w_doc_code & " and subcode = " & w_doc_subcode & " and doc_num= " & w_doc_num & " "
'conn.ConnectionString = ("server=developer01;uid=sa;password=aims;database=DVPSOC;timeout=45")
'myCom = New SqlCommand(sel2, conn)
'conn.Open()
'drr = myCom.ExecuteReader()
'If drr.Read Then
' Me.ImageMap1.ImageUrl = drr.Item("attach")
'End If
'conn.Close()
Am getting an exeption on the following line Me.ImageMap1.ImageUrl = drr.Item("attach")
saying: Conversion from type 'Byte()' to type 'String' is not valid.
knowing that i tried converting using ToString but it's not getting any output then.
thanks for your help.
a example in C# as below:
try
{
con = new SqlConnection(constr);
cmd = new SqlCommand("select photopath,Photo from employees where employeeid=14", con);
con.Open();
dr = cmd.ExecuteReader();
while(dr.Read())
{
if (!dr.IsDBNull(1))
{
byte[] photo = (byte[])dr[1];
MemoryStream ms = new MemoryStream(photo);
pictureBox1.Image = Image.FromStream(ms);
}
}
}
catch (Exception ex)
{
dr.Close();
cmd.Dispose();
con.Close();
MessageBox.Show(ex.Message);
}
hope can help u a little
|||Sorry but that is not the answer to the question. picturebox cannot be used in ASP.Net.
HOW to Retrieve an image from sql server and display it in ASP.net using "imagemap or image
Ok, the problem is that , i have a field called "Attach" in sql of type image, when selecting it , the field is getting data of type BYTE(). which am being unable to display them on an Image on the panel.
using the following vb.net code:
'Dim sel2 As String
'Dim myCom As SqlCommand
'Dim conn As New SqlConnection
'Dim drr As SqlDataReader
'Dim image As System.Drawing.Image
'sel2 = "select * from attach where att_desc = '" & DropDownList1.SelectedItem().Text & "' and doc_code = " & w_doc_code & " and subcode = " & w_doc_subcode & " and doc_num= " & w_doc_num & " "
'conn.ConnectionString = ("server=developer01;uid=sa;password=aims;database=DVPSOC;timeout=45")
'myCom = New SqlCommand(sel2, conn)
'conn.Open()
'drr = myCom.ExecuteReader()
'If drr.Read Then
' Me.ImageMap1.ImageUrl = drr.Item("attach")
'End If
'conn.Close()
Am getting an exeption on the following line Me.ImageMap1.ImageUrl = drr.Item("attach")
saying: Conversion from type 'Byte()' to type 'String' is not valid.
knowing that i tried converting using ToString but it's not getting any output then.
thanks for your help.
a example in C# as below:
try
{
con = new SqlConnection(constr);
cmd = new SqlCommand("select photopath,Photo from employees where employeeid=14", con);
con.Open();
dr = cmd.ExecuteReader();
while(dr.Read())
{
if (!dr.IsDBNull(1))
{
byte[] photo = (byte[])dr[1];
MemoryStream ms = new MemoryStream(photo);
pictureBox1.Image = Image.FromStream(ms);
}
}
}
catch (Exception ex)
{
dr.Close();
cmd.Dispose();
con.Close();
MessageBox.Show(ex.Message);
}
hope can help u a little
|||Sorry but that is not the answer to the question. picturebox cannot be used in ASP.Net.
HOW to Retrieve an image from sql server and display it in ASP.net using "imagemap or i
Ok, the problem is that , i have a field called "Attach" in sql of type image, when selecting it , the field is getting data of type BYTE(). which am being unable to display them on an Image on the panel.
using the following vb.net code:
'Dim sel2 As String
'Dim myCom As SqlCommand
'Dim conn As New SqlConnection
'Dim drr As SqlDataReader
'Dim image As System.Drawing.Image
'sel2 = "select * from attach where att_desc = '" & DropDownList1.SelectedItem().Text & "' and doc_code = " & w_doc_code & " and subcode = " & w_doc_subcode & " and doc_num= " & w_doc_num & " "
'conn.ConnectionString = ("server=developer01;uid=sa;password=aims;database=DVPSOC;timeout=45")
'myCom = New SqlCommand(sel2, conn)
'conn.Open()
'drr = myCom.ExecuteReader()
'If drr.Read Then
' Me.ImageMap1.ImageUrl = drr.Item("attach")
'End If
'conn.Close()
Am getting an exeption on the following line Me.ImageMap1.ImageUrl = drr.Item("attach")
saying: Conversion from type 'Byte()' to type 'String' is not valid.
knowing that i tried converting using ToString but it's not getting any output then.
thanks for your help.
a example in C# as below:
try
{
con = new SqlConnection(constr);
cmd = new SqlCommand("select photopath,Photo from employees where employeeid=14", con);
con.Open();
dr = cmd.ExecuteReader();
while(dr.Read())
{
if (!dr.IsDBNull(1))
{
byte[] photo = (byte[])dr[1];
MemoryStream ms = new MemoryStream(photo);
pictureBox1.Image = Image.FromStream(ms);
}
}
}
catch (Exception ex)
{
dr.Close();
cmd.Dispose();
con.Close();
MessageBox.Show(ex.Message);
}
hope can help u a little
|||Sorry but that is not the answer to the question. picturebox cannot be used in ASP.Net.