Creating and Using a C# Class Library for SSRS

Who is online?  0 guests and 1 members
Home  »  Blogs  »  JeffRush  »  Creating and Using a C# Class Library for SSRS
 
0
/5
Avg: 0/5: (0 votes)

Comments (8)

DevinKnight
DevinKnight said:

Wow!  Awesome post!

12/21/2010
 · 
 
by
DustinRyan
DustinRyan said:

Very helpful post, Jeff. I look forward to reading more from you!

12/21/2010
 · 
 
by
briankmcdonald

I agree. This is a very informative post. I thought that you would have to add the dll to the GAC though (at least I did when using SSRS 2005). Can't remember and I am on some meds right now from the surgery. :)

12/22/2010
 · 
 
by
DaveClark
DaveClark said:

Excellent info - thanks for sharing!

12/26/2010
 · 
 
by
Anil
Anil said:

Hello JeffRush, It's nice blog ,but while i am trying similar as describe in your blog .I got a error as "The name 'GoesByOrFirst' does not exist in the current context" while debugging.It would be better if you can provide the .dll and database used and as well .rdl of it.So, i can figure out it.

Thanks, Anil Maharjan

12/27/2010
 · 
 
by
JeffRush
JeffRush said:

Anil: I am afraid I cannot provide the items requested, however you are absolutely right about the error. I did not notice that when I was going through the first time and neglected to include it.

You will need to add one additional function:

    

  private static string GoesByOrFirst(string firstName, string goesByName, bool returnBoth)

        {
            if (!returnBoth)
            {
                if (goesByName != null && goesByName.Length > 0) return goesByName;
                else if (firstName != null && firstName.Length > 0) return firstName;
            }

            string name = "";

            if (firstName != null && firstName != null)
            {
                name = firstName;
            }

            if (goesByName != null && goesByName.Length > 0)
            {
                if (name.Length > 0)
                {
                    name += " \"" + goesByName + "\"";
                }

                else
                {
                    name = goesByName;
                }
            }
            return name;
        }

Please add this function and let me know your results.

My apologies for the confusion.

12/27/2010
 · 
 
by
Anil
Anil said:

Hello jeff,

All works fine now but after creating some test DB when i create .rdl and put the exp code as you given it shows some error and i could not figure out what's the problem exact so could tell me whats the main things the output trying to say and whats the benefit of working with C# library in SSRS?.

Thanks 

Anil 

12/28/2010
 · 
 
by
JeffRush
JeffRush said:

Anil: The benefit that I tried to highlight in the blog post was allowing the end user to determine name formatting at run time so that a single report can satisfy any of the desired name formats.

Can you email me the errors you are experiencing? Jeff.Rush@TheDataYouNeed.com I will try to debug if I can.

12/28/2010
 · 
 
by
Blogs RSS Feed

JeffRush's latest blog posts

Blogs RSS Feed

Latest community blog posts