Showing posts with label instead. Show all posts
Showing posts with label instead. Show all posts

Monday, March 19, 2012

Can NEWLINE in FORMAT?

I have a date field and use the format: dd MM/dd/yy
The output is: Fri 10/15/04
I would like this instead:
Fri
10/15/04
Is there a way to add a line break using the simple format codes?
Thanks, JerryI have found that adding
... & chr(10) & chr(13) & ...
seems to do the trick.
"Jerry Nixon" wrote:
> I have a date field and use the format: dd MM/dd/yy
> The output is: Fri 10/15/04
> I would like this instead:
> Fri
> 10/15/04
> Is there a way to add a line break using the simple format codes?
> Thanks, Jerry
>|||I do not know of a way that you can add a line break when typing the format
code into the Format property. It can be done in several ways when using an
expression. For example:
=Format( Fields!YoureDate.Value, "ddd") + ControlChars.crlf + Format(
Fields!YourDate.Value, "MM/dd/yy")
"Jerry Nixon" wrote:
> I have a date field and use the format: dd MM/dd/yy
> The output is: Fri 10/15/04
> I would like this instead:
> Fri
> 10/15/04
> Is there a way to add a line break using the simple format codes?
> Thanks, Jerry
>

Wednesday, March 7, 2012

Can i use sql reporting svc with asp3.0 classic

Hi ,
I have to develop an application developed in asp 3.0 and now was wondering
if i could use MSSQL reproting services instead of using Crystal Reports.?
i know for design u need to have .net framework but can i integrate it while
using asp 3.0 and IIS 5.0
Thanks.
--KingIf you can figure out what the URL would be for a report, you can put
the report in an iframe, or even it's own page (i.e. a new window). Try
looking through the Reporting Services documentation for "URL Access."
Once you get the format of the URL down, it's pretty easy to customize
how the page loads. I do this to redirect users directly to PDFs of
reports.
~Andy
king wrote:
> Hi ,
> I have to develop an application developed in asp 3.0 and now was wondering
> if i could use MSSQL reproting services instead of using Crystal Reports.?
> i know for design u need to have .net framework but can i integrate it while
> using asp 3.0 and IIS 5.0
> Thanks.
> --King|||Thanks Andy.
That was helpful. Another question i have is if want the reports be
generated whenever the user clicks on the link ( i mean i wanna see latest
report everytime is it possible to do.
Also how can i implement security so that only authorized people can see
those reports . I am thinking of providing a login page and based on login
and password a person is able to see a particular report. so on the asp side
i can do it by authenticating the user against a table in database but what
about rs side .
If a person knows the url of the report can he see the report without login
?
THanks
"Andy Hardin" wrote:
> If you can figure out what the URL would be for a report, you can put
> the report in an iframe, or even it's own page (i.e. a new window). Try
> looking through the Reporting Services documentation for "URL Access."
> Once you get the format of the URL down, it's pretty easy to customize
> how the page loads. I do this to redirect users directly to PDFs of
> reports.
> ~Andy
> king wrote:
> > Hi ,
> > I have to develop an application developed in asp 3.0 and now was wondering
> > if i could use MSSQL reproting services instead of using Crystal Reports.?
> > i know for design u need to have .net framework but can i integrate it while
> > using asp 3.0 and IIS 5.0
> >
> > Thanks.
> >
> > --King
>|||The report should be freshly generated everytime someone accesses it.
I'm still trying to wrap my head around the security stuff. Every where
I've used RS has been in a domain environment where everyone has access
to all of the reports. You may want to search on google and the
newsgroup for information about implementing your own security.
~Andy
king wrote:
> Thanks Andy.
> That was helpful. Another question i have is if want the reports be
> generated whenever the user clicks on the link ( i mean i wanna see latest
> report everytime is it possible to do.
> Also how can i implement security so that only authorized people can see
> those reports . I am thinking of providing a login page and based on login
> and password a person is able to see a particular report. so on the asp side
> i can do it by authenticating the user against a table in database but what
> about rs side .
> If a person knows the url of the report can he see the report without login
> ?
> THanks
>
> "Andy Hardin" wrote:
>
>>If you can figure out what the URL would be for a report, you can put
>>the report in an iframe, or even it's own page (i.e. a new window). Try
>>looking through the Reporting Services documentation for "URL Access."
>>Once you get the format of the URL down, it's pretty easy to customize
>>how the page loads. I do this to redirect users directly to PDFs of
>>reports.
>>~Andy
>>king wrote:
>>Hi ,
>>I have to develop an application developed in asp 3.0 and now was wondering
>>if i could use MSSQL reproting services instead of using Crystal Reports.?
>>i know for design u need to have .net framework but can i integrate it while
>>using asp 3.0 and IIS 5.0
>>Thanks.
>>--King|||You may want to look at these articles on security in Reporting Services.
http://www.devx.com/dotnet/Article/26759/0/page/1
http://www.devx.com/dotnet/Article/27133/0
~Andy
king wrote:
> Thanks Andy.
> That was helpful. Another question i have is if want the reports be
> generated whenever the user clicks on the link ( i mean i wanna see latest
> report everytime is it possible to do.
> Also how can i implement security so that only authorized people can see
> those reports . I am thinking of providing a login page and based on login
> and password a person is able to see a particular report. so on the asp side
> i can do it by authenticating the user against a table in database but what
> about rs side .
> If a person knows the url of the report can he see the report without login
> ?
> THanks
>
> "Andy Hardin" wrote:
>
>>If you can figure out what the URL would be for a report, you can put
>>the report in an iframe, or even it's own page (i.e. a new window). Try
>>looking through the Reporting Services documentation for "URL Access."
>>Once you get the format of the URL down, it's pretty easy to customize
>>how the page loads. I do this to redirect users directly to PDFs of
>>reports.
>>~Andy
>>king wrote:
>>Hi ,
>>I have to develop an application developed in asp 3.0 and now was wondering
>>if i could use MSSQL reproting services instead of using Crystal Reports.?
>>i know for design u need to have .net framework but can i integrate it while
>>using asp 3.0 and IIS 5.0
>>Thanks.
>>--King

Can I use SQL instead of cursor?

Hi,

I'm currently converting a VB function to SQL-Server. The function uses a cursor to find the "terms of delivery" (TOD) with the highest priority.

I have a table with articlenumber, tod (and lots of other columns that doesn't matter now)

ABC123 , AFG
ABC123 , AFG
ABC123 , BGH
ABC123 , BGH
ABC123 , CDD

"CDD" has the highest priority and therefore ALL with the same articlenumber should use that tod.

The existing function uses a cursor and loops through a recordset and updates every row with the same articlenumber as the current row with the tod with the highest priority (of the ones read) with the same articlenumber.

One update per row takes "forever" to run...

I figured it would be possible to select the tod with the highest priority for one articlenumber into a temp table and then do ONE update to set the tod on all rows...Here is a quick and dirty. It could be improved with a little work:



create table foo (ArtNo varchar(25), pri varchar(25))
insert into foo values ('ABC123' , 'AFG')
insert into foo values ('ABC123' , 'AFG')
insert into foo values ('ABC123' , 'BGH')
insert into foo values ('ABC123' , 'BGH')
insert into foo values ('ABC123' , 'CDD')
insert into foo values ('ABCD123' , 'AFG')
insert into foo values ('ABCD123' , 'AFG')
insert into foo values ('ABCD123' , 'BGH')
insert into foo values ('ABCD123' , 'BGH')
insert into foo values ('ABCD123' , 'CDE')
select ArtNo, max(pri) pri
into #temp
from foo
group by ArtNo
update foo
set foo.pri = #temp.pri
from foo,#temp
where foo.Artno = #temp.ArtNo

select * from foo
drop table foo|||Hmm..

What if BGH has the highest priority?

The priority is not determined by the alphabet. :-(|||Then you will need a table or some other method to determine an ordered set of priorities.

As a start, look at how you do it now.|||I'm at home now, but something struck me on the way home...

If I change the three letter combinations to numbers according to their priority, I can then use:

SELECT articlenumber, MAX(tod)
FROM mytable
GROUP BY articlenumber

into a temptable..

The I use the temptable and updates ALL articlenumbers with their right tod.

I'll try it tomorrow. Clock is 5 in the afternoon in sweden now. :-)|||I'm at home now, but something struck me on the way home...

If I change the three letter combinations to numbers according to their priority, I can then use:

SELECT articlenumber, MAX(tod)
FROM mytable
GROUP BY articlenumber

into a temptable..

Then I use the temptable and updates ALL articlenumbers with their right tod.

I'll try it tomorrow. Clock is 5 in the afternoon in sweden now. :-)|||I'm at home now, but something struck me on the way home...

If I change the three letter combinations to numbers according to their priority, I can then use:

SELECT articlenumber, MAX(tod)
FROM mytable
GROUP BY articlenumber

into a temptable..

Then I use the temptable and updates ALL articlenumbers with their right tod.

I'll try it tomorrow. Clock is 5 in the afternoon in sweden now. :-)|||Worked like a charm.. My solution:

--

/* Get priorities of tod */
UPDATE mytable
SET tod =
CASE tod
WHEN 'BGH' THEN '1'
WHEN 'AFG' THEN '2'
WHEN 'CDD' THEN '3'
ELSE '999'
END

/* Create temptable */
create table dbo.temp_table (articlenumber varchar(31), PRIO varchar(10))

/* Make temporary list with "highest" TOD */
insert into dbo.temp_table (articlenumber, PRIO)
select articlenumber,
CASE MIN(cast(tod AS INT))
WHEN '1' THEN 'BGH'
WHEN '2' THEN 'AFG'
WHEN '3' THEN 'CDD'
ELSE 'N/A'
END
from mytable
GROUP BY articlenumber

/* Update ALL to highest tod */
UPDATE mytable
SET tod = b.PRIO
FROM mytable a, dbo.temp_table b
WHERE
(a.articlenumber = b.articlenumber)

--

Can I use SQL Developer edition with VWD 2005 Express?

Can I use sql developer 2000 instead of using the sql 2005 with the VWD 2005 Express. If so, how do I configure the asp 2.0 to utilize it for security? When I administer the webite it's look for the sql express.

Help.

There should be no problems with security as the models are the same, however I believe VWD uses some special features of express that are not available in SQLDE. In addition most of the quickstart samples and starter apps assume a connection string of .\sqlexpress, you need to search for this in the web.config files and other places in the projects to replace it with either . or the named of the instance you installed DE as.

-Euan

Saturday, February 25, 2012

Can I use MDSE instead of SQL 2000 ??

Hey guru's out there I'm attempting to run a test box with mdse instead of sql 2000 with the commerce kit..i get the following error message...when attempting to access iis: The service is installed and running on xp...

HELP

Server Error in '/CommerceVBSDK' Application.

SQL Server does not exist or access denied.
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.

Exception Details: System.Data.SqlClient.SqlException: SQL Server does not exist or access denied.

Source Error:

Line 28: Dim products As ASPNET.StarterKit.Commerce.ProductsDB = New ASPNET.StarterKit.Commerce.ProductsDB()
Line 29:
Line 30: MyList.DataSource = products.GetProductCategories()
Line 31: MyList.DataBind()
Line 32:

Source File: C:\Program Files\ASP.NET Starter Kits\ASP.NET Commerce (VBSDK)\CommerceVBSDK\_Menu.ascx Line: 30

Stack Trace:

[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +474
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
ASPNET.StarterKit.Commerce.ProductsDB.GetProductCategories()
ASP._Menu_ascx.Page_Load(Object sender, EventArgs e) in C:\Program Files\ASP.NET Starter Kits\ASP.NET Commerce (VBSDK)\CommerceVBSDK\_Menu.ascx:30
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Control.LoadRecursive() +98
System.Web.UI.Control.LoadRecursive() +98
System.Web.UI.Page.ProcessRequestMain() +731Try creating a blank Database with OSQL and give ASP.NET account DBO permissions in the Database before installing the Commerce Starter kit. Hope this thelps.

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

Kind regards,
Gift Peddie

Sunday, February 12, 2012

Can I pass ResultSet as parameter of Stored Proc directly ?

Hi, All
Is it possible for me that I pass a resultset as parameter of Stored Proc
directly instead of putting it to a table before calling a stored procedure
which manipulate data of the table?
Thanks a lot in advance for your answer.
http://www.sommarskog.se/share_data.html
http://www.aspfaq.com/
(Reverse address to reply.)
"Sally" <Sally@.discussions.microsoft.com> wrote in message
news:1FBF91FA-172B-41AC-8834-0C7AAE52310D@.microsoft.com...
> Hi, All
> Is it possible for me that I pass a resultset as parameter of Stored Proc
> directly instead of putting it to a table before calling a stored
procedure
> which manipulate data of the table?
> Thanks a lot in advance for your answer.

Can I pass ResultSet as parameter of Stored Proc directly ?

Hi, All
Is it possible for me that I pass a resultset as parameter of Stored Proc
directly instead of putting it to a table before calling a stored procedure
which manipulate data of the table?
Thanks a lot in advance for your answer.http://www.sommarskog.se/share_data.html
http://www.aspfaq.com/
(Reverse address to reply.)
"Sally" <Sally@.discussions.microsoft.com> wrote in message
news:1FBF91FA-172B-41AC-8834-0C7AAE52310D@.microsoft.com...
> Hi, All
> Is it possible for me that I pass a resultset as parameter of Stored Proc
> directly instead of putting it to a table before calling a stored
procedure
> which manipulate data of the table?
> Thanks a lot in advance for your answer.

Can I pass ResultSet as parameter of Stored Proc directly ?

Hi, All
Is it possible for me that I pass a resultset as parameter of Stored Proc
directly instead of putting it to a table before calling a stored procedure
which manipulate data of the table?
Thanks a lot in advance for your answer.http://www.sommarskog.se/share_data.html
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Sally" <Sally@.discussions.microsoft.com> wrote in message
news:1FBF91FA-172B-41AC-8834-0C7AAE52310D@.microsoft.com...
> Hi, All
> Is it possible for me that I pass a resultset as parameter of Stored Proc
> directly instead of putting it to a table before calling a stored
procedure
> which manipulate data of the table?
> Thanks a lot in advance for your answer.