.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

How to retreive week number in SSRS

Posted By:      Posted Date: October 11, 2010    Points: 0   Category :Sql Server

How to retreive week number in SSRS if i have date 09/25/2010 in Expression



View Complete Post

More Related Resource Links

Variable number of colomns in ssrs report



I have a stored procedure which is built on PIVOT fuction. I am using the stored procedure to generate a report.

some time the stored procedure will generate the variable no of colomns, in ssrs dataet is updating with variable no of colomns, at that time report is not supporting.

i am using table control in SSRS. some one suggested me matrix control, but i need to change my stored procedure to work with matirx control.

i dont want to change the stored procedure.

can any one suggest me how to resolve this in SSRS.



SSRS 2005 report export to excel - show text as number


When exports the report to excel, some columns are numbers(something like 00125987). We need these columns to be text,  but excel convert these columns in numbers and in result we received not "00125987" but "125987".  

How to fix that? 

We need all these columns to be text.



Hi Experts.... I'm trying to get Fiscal Weeks in the form of year + week number in 6 digit format b

CONVERT(int,(cast(datepart(year, AuditDate) as varchar) + (case when (datepart(WK , AuditDate) < 9) then '0' else '' end) + cast(datepart(WK , AuditDate) as varchar))) As 'FiscalWeekId' 

20069 > 200609
20069 > 20060

ssrs dropdown parameter with Week startDate and end date so that user selects only week and report s


Hi all,

I have a report where I have to show the Week start and end date in the dropdown instead of the date range. Please advice me how to proceed with this report parameter. Thanks a lot in advance, all help is appreciated.


SSRS Designer runs very slowly with large number of groups


I've developed a workaround for the recursive Parent-Child issue where groups do not export out to Excel properly (no expand\collapse navigation, no stepped groups) that involves setting up a group for each parent and then applying a filter for the parent on the UniqueName.  Children groups can then be set up with the Group set to ParentUniqueName.  This works great, except that I now have 30+ groups.  The designer (both the BIDS and ReportBuilder) have slowed down to a crawl where each click or keyboard navigation etc. takes 7+ seconds.  This has made report building extremely painful!  It is not a hardware problem, as I have tried it on a number of high powered machines with the same results.  The report itself runs relatively quickly.

Is there an upper limit for the number of groups that SSRS designer is meant to work with, or a workaround that I am not aware of?

Find week number in xpath from two dates in SharePoint 2010



I am trying to determine the week of the year from two dates. The first date will be the first day and month of that year (e.g. 01/01/2005) and the second will be the date of a document(05/05/2005). We tried to accomplish this same task within SharePoint, not using the SP Designer, however, we could not because we could not utilize the name column. Anyhow below is what I got so far. I search for a date function to perform subtraction but could not find any. Thank in advance.


ddwrt:FormatDate(substring($thisNode/@FileLeafRef.Name,1,10),1041,1) -ddwrt:FormatDate(concat(substring($thisNode/@FileLeafRef.Name,1,4),'-01-01'),1041,1)

Convert English to Arabic number without changing any regional settings in .net

Well, most applications that I worked with was multilingual that supports English UI and Arabic UI.

And one of the major issue that we have faced is displaying Arabic numbers without the need of changing the regional settings of the PC.

So the code below will help you to display Arabic number without changing any regional settings.

dynamically adding sql server columns based on number of files in fileuploader


I want to create a new table to sql database at runtime.  The column names would be "Name", "Date", "Event".  I would also like to have one more column name "Image" but the problem is that since the amount of images will vary, I want the application to count the amount of files in the Multiple fileuploader and then add a image column to the table for the respected amount of files. 

For example if i am uploading 3 files in the multiple fileuploader, the names should be "Name", "Date", "Event", "Image1", "image2", Image3"

I also would like that table name to be name dynamically from the textbox Name when the user enters the information.


I have the following code to make a new table, but I dont know how to name the fields at runtime like previously asked please help!!!


Dim objConn As New SqlConnection("Server=<servername>;uid=<userid>;pwd=<password>;database=master")


Embeb a variable number of videos


I need to provide some alternate content for my non-Flash users.

I have a directory of video files that is scanned using the DirectoryInfo() function, and I want to use the results to embed all files ending in ".mov" in QuickTime players on a web form.

How would you approach this? Right now I am using the count on the array of videos to determine how many times to repeat the embed code.  But this seems inelegant.

Is there a way to have a single QuickTime player.ascx control that gets duplicated according to the number of videos available for display?

Article commenting by line number


I'm wondering what's the best way to approach an online article system that allows users to comment by clicking on the line they are commenting about? Essentially the same way Adobe Acrobat works with comments where you can click anywhere and the text is saved for that location.

I'm assuming a mix of jQuery would be the crux of the interface. The system would need to save comments so that when another user logs in, they will also see the other comments but they can´t edit them - only add their own.

Any suggestions would be great.

The number of members in the conceptual type ... does not match with the number of members on the ob



I've added a scalar property to an entity and now ASP.NET Dynamic Data scaffolding throws this error:

The number of members in the conceptual type 'TrainingModel.Users' does not match with the number of members on the object side type 'TrainingModel.Users'. Make sure the number of members are the same.

This happens at the following line in global.asax:
model.RegisterContext(typeof(TrainingModel.TrainingEntities), new ContextConfiguration() { ScaffoldAllTables = true });

Please help!

huge number of data from database ... so how to minimize load time


Hi ...

I have used the above method to configure my crystal report ...

Its working fine , But i have huge number of data in database ....

So , it take long time to load the report ...

So , i have decided to show only the last 50 records inserted into the database , not all the 500 records to be loaded every time.

Plz help me with this issue  ...


Also , Plz explain me abt index legend in crystal report.

where can i download from SSRS?


Hi all,

My  machine is alread installed with Sql Server 2005.  I need to install sql server 2005 reporting services as a add-on.

Where can i download this from. Can anyone post the link here..?


Thanks in advance


MDX Query parameter from SSRS


I've a MDX Query that has where clause as shown below.
I'm designing report using SSRS 2008. How can i pass date as parameter ? I tried to setup @from and @to as parameter but not working ?
any ideas....

WHERE ( {[Date Central].[Calendar Date].[2010-04-01 00:00:00]:[Date Central].[Calendar Date].[2010-08-30 00:00:00]} )

need it to work as
WHERE ( {[Date Central].[Calendar Date].[@From]:[Date Central].[Calendar Date].[@To]} )



How to change text in columns in SSRS?


I need to create a complex report and export it to Excel. 

In the first column header, text is displayed as "Hide Daily Columns", but I need the text to change as "Unhide Daily columns" when I click on it and when the text changes the columns under "daily" header (I have 3 columns under this header) present in the report shud be hidden and only weekly columns shud be visible. Any ideas please. I am new to SSRS and tried out many ways but didn't get it.

dropdownbox which selects records based on criteria (TODAY, THIS WEEK, THIS MONTH, etc)


I have a dropdownbox which I want to use to search records based on a timescale. The gridview populates results based from that search.

So here is how I want to work this;

If a user selects "today" - a list of records input today are populated. If "this week" is selected, a list of all records added within that week from todays date is populated.

I created a forum on this issue previously but to no avail whatsoever. How do I work around this problem?

Help would be much appreciated

Is Conditional Subscription possible in SSRS 2005?


Hi Guys,

Is there a way to set up a subscription that will send e-mails based on the contents of a report? For example, I want to schedule a daily subscription that will only send an e-mail if the report contains data, otherwise it will do nothing for that day. i.e If the report has more than one row, it should send the mail otherwise it should not send the mail.....

Is it possible in SSRS 2005 or is there any other way to do it???


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend