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


Post New Web Links

SSRS option to make capital first letter and rest small letters of a string

Posted By:      Posted Date: September 10, 2010    Points: 0   Category :Sql Server
 
Hi, In the 'Name' field of String type is appearing all capital letters. I want to appear it as first letter is capital and rest all small. If there is space between two characters, then the second should appear as Caps again. Ex: 1. PETER Should appear like Peter 2. ALEXANDAR PETER Should appear as Alexander Peter Is it possible in SSRS or SQL Query ? I am using SQL Server 2005 SSRS Reporting Services. Thanks,


View Complete Post


More Related Resource Links

How to find records based on CAPITAL and small letters in SQL Query?

  

Hi,

I stumbled upon this scenario at my work and it is really something I was not expecting. I know that in general SQL itself is not a CASE SENSITIVE language ... so it will not make any difference if i write select *, or SELECT * or SeLEct * ...

But recently I came across a situation where I am required to find results from a table where more than one record exists with just a difference of Captial and Small letter word. Let me explain my problem in detail,

I work for a government client, in one of their table they have list of all state statues and out of them some have exactly same string except in that string some letters are capitalized, e.g.  46b-12 (A) and 46b-12 (a) ... now my question is how can i write a query which can find only record that I search, e.g if I search select desc from statues where code='46b-12 (a)' ... it should find only one record not two.


replace empty string with value if it is empty in ssrs

  
I need to place a "Days Not Calculated" of the string is empty, if it is not empty then a need to use the days calculated and put "days old" on the end of the number....SSRS 2K5 iif (Fields!AGE.Value, "", "Days Not Calculated")& " Days Old "

SSRS 2008 R2 - How to make the CalloutLine in the SmartLabels disappear ?

  
In the SmartLabels it is possible to set the CalloutLineStyle to "None" but still the line stays in there. Also setting the line with to 0 keeps it in the chart. And it is not possible to set the color to No Color. I can get ride of the Anchor, Style in general but the line sticks. I really  wonder what the idea behind this behaviour is.

Disabling Export option for a single individual SSRS report

  
HI Forum Members,

    I read some discussions on disabling Export option in SSRS for an individual report.
Some said to go into the Report Properties in the Design tab and write below code:
Set ReportViewer.ShowExportControls = false;

I'm new for SSRS apart from doing some adhoc reports - So, i'm confused here. Where should i write this code?
Can any one help me.

Thanks,
Chaitanya.

Font/letter spacing issue when printing from SSRS 2008 report page

  

We are developing reports in SSRS 2008.  When printing from the SSRS report page, we are seeing that that some text is "clumping" together or spaced oddly. I have tried a variety of printers so it's not printer-specific. If you export from the SSRS page to PDF or to Word and then print, everything prints as expected.

Nothing is as good as real text/names/data, but to reproduce, simply create several text boxes with...
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
123456789000,000,000.00

I used several common fonts...
Arial, 10 pt (SSRS 2008 default)
Times New Roman, 12 pt (Office 2003 default)
Calibri, 11 pt (Office 2007 default)
Verdana, 11 pt
Tahoma, 11 pt

In the example above, I used normal weight, nothing fancy... If you use bold and underline, which is common for a page/column header or footer, this issue is even more apparent.

It feels similar to the following issue: https://connect.microsoft.com/SQLServer/feedback/details/482312/ssrs-report-font-rendering-issue

A workaround would obviously be to export to PDF and then print, but these are steps that our end users shouldn't have to (and won't want to) put up with to produce reports/invoices/etc. that ultimately go

SSIS as data source in SSRS connection string

  

I have a connection string

="/f c:\test\test2\test2\package.dtsx /set \package.variables[User::varfil].Value;" & Parameters!varempid.Value

but its not returning any results. I need a valid connection string.


want to display 24 hours time and date with datatype Datetime (Not String) in SSRS

  

Hi All,

I want to display 24 hours time and date in SSRS & for that I am using Format(now,"MM/dd/yyyy HH:mm:ss") but I am using this expression in Parameter, where I need to define datatype of that parameter as DateTime, not string. For Expression Format(now,"MM/dd/yyyy HH:mm:ss"), If I use DateTime datatype, It is showing error but working with String datatype.

For example:

I have parameter To Date  and value of this parameter should be 10/11/2010 13:09:16 (To Date: 10/11/2010 23:09:16) , not in AP or PM format and datatype of this parameter, want to keep DateTime that I can select value from Calender.

Please suggest me how I can achieve this?. I don't want to do it in stored Procedure side, want to do it in report side.


Thanks Shiven:)

string to datetime conversion using date parameters in SSRS

  

Hello, I have a database field that I am pulling that is type string, but the format of each value is mm/dd/yyyy.  I want to convert this to a datetime format (minus the time) so that i can compare this value to a parameter date range (begin date and end date) that are type datetime so that i can use the calendar control in my report.  i've tried in my select statement to use select.....convert(datetime, stringfieldname, 101), but I get an error that says "Conversion failed when converting datetime to character string". 

I am also open to converting the datetime parameters to strings to do the comparison, but not sure the best way to do this either.

thanks!


programatically pass the connection string to the ssrs reports

  

hi... to all
i've created ssrs reports local following is my code..
 public void source(string tbname,string Rptname)
        {
            ReportViewer1.Visible = true;
            string myQuery = "select * from " + tbname;
            SqlConnection myConnection = new SqlConnection(ConnectionString);
            SqlCommand myCommand = new SqlCommand(myQuery, myConnection);
            myCommand.Connection.Open();
            SqlDataAdapter da = new SqlDataAdapter(myCommand);
            DataSet dt = new DataSet();
            da.Fill(dt);
            //ReportParameter[] p = new ReportParameter[1];
            //p[1] = new ReportParame

programatically pass the connection string to the ssrs reports

  
hi... to all
i've created ssrs reports local following is my code..
 public void source(string tbname,string Rptname)
        {
            ReportViewer1.Visible = true;
            string myQuery = "select * from " + tbname;
            SqlConnection myConnection = new SqlConnection(ConnectionString);
            SqlCommand myCommand = new SqlCommand(myQuery, myConnection);
            myCommand.Connection.Open();
            SqlDataAdapter da = new SqlDataAdapter(myCommand);
            DataSet dt = new DataSet();
            da.Fill(dt);


            //ReportParameter[] p = new ReportParameter[1];
            //p[1] = new ReportParameter("@p_dno", "5");
            //this.ReportViewer1.LocalReport.SetParameters(p);
 &n

programatically pass the connection string to the ssrs reports

  
hi... to all
i've created ssrs reports local following is my code..
 public void source(string tbname,string Rptname)
        {
            ReportViewer1.Visible = true;
            string myQuery = "select * from " + tbname;
            SqlConnection myConnection = new SqlConnection(ConnectionString);
            SqlCommand myCommand = new SqlCommand(myQuery, myConnection);
            myCommand.Connection.Open();
            SqlDataAdapter da = new SqlDataAdapter(myCommand);
            DataSet dt = new DataSet();
            da.Fill(dt);


            //ReportParameter[] p = new ReportParameter[1];
            //p[1] = new ReportParameter("@p_dno", "5");
            //this.ReportViewer1.LocalReport.SetParameters(p);
 &n

Capital letter in every sentence.

  


Hello!

I am using the following code to capitilize the first letter theres written

public String ToUpperFirst(string value)
    {
        if (string.IsNullOrEmpty(value))
            return string.Empty;

        char[] letters = value.ToCharArray();   // convert to char array of the string
        letters[0] = char.ToUpper(letters[0]);  // upper case the first char

        return new string(letters); // return the array made of the new char array
    }


I would like it to capatilize every letter after a .(dot) aswell.

any suggestions on how to do that?

Best regards


Selection option for SSRS

  

Hi experts

      I am new to SSRS. I created an example report, it contains employee names and their salary in rows and in colums contains Year like

           2009         2010

abc      150000     200000

xyz      200000     225000   

Now I want user to select for which employee he wants to see the data

 

Thanks in advance

Sushmitha


"Target string size is too small to represent the XML instance"

  

This is a tough error....

The situation:  we are trying to manage Stored Procedures (ALTER, CREATE, DROP statements) on one of our SQL2005 servers and this error spews out:

"Target string size is too small to represent the XML instance"

Now this script i wrote (simple alter statement adding a column) works on 4 other versions of SQL 2005, but when i try a certain server, i get that error

Searching Google, Yahoo, and MSN, all three point to one single instance of this error, right here on Don Keily's blog

http://www.sqljunkies.com/WebLog/donkiely/archive/2005/10/20.aspx

 and unfortunately... no solution  :(

Maybe in the 3 months since that post, someone might have run across that and knows how to fix?


Categories: 
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