Jul 12, 2011

Get Physical Path using Asp.Net

Hello Friend,

I have found to get physical path from different way.

1) On .aspx.cs Page
string path = Server.MapPath("/");

2) On Class File (.CS) Page
String Path = HttpContext.Current.Server.MapPath("/");

3) If you are using Thread and want to get physical path in .CS or .asax file
String Path = HttpContext.AppDomainAppPath.Replace("//","\\");

Jul 7, 2011

India Currency Format in .Rdcl report and Write custom function in .Rdcl Report.







Step 1: First choose Document outline from left panel








Step 2: Right click on Report and select Property











Step 3: Write function in code tab











Step 4: Then select field from report which you want to set currency format.












Step 5: Call custom function from code tab. using =code.FunctionName(parameter)









Step 6: You will get result.

I hope help to you.

Jul 6, 2011

Declare Nested Cursor in Sql Server

declare @id bigint
--Declare outer cursor
declare outer_cursor cursor for
select id from table

--Declare inner cursor as a variable
declare @inner_cursor cursor

open outer_cursor
fetch next from outer_cursor into @id
while(@@FETCH_STATUS=0)
begin
-- Few statements
declare @cartid bigint
declare @qty bigint
set @inner_cursor = cursor for select id,qty from cart where productid=@id

open @new_count
fetch next from @
inner_cursor into @cartid, @qty while(@@FETCH_STATUS=0)
begin
--Few Statements
end
end