Showing posts with label intended. Show all posts
Showing posts with label intended. Show all posts

Friday, March 30, 2012

Hide empty tables

Hi,

I've just creates a report with about 20 Tables. To my suprise, it almost runs as intended ;-)
But there is one flaw - Is there any way of hiding an empyt table?
I want to hide all tables that are not filled with data. But wich one is empty differs from the entered parameter.

So long
Sven
(Germany)YOu could set the NoRows property to an empty string, this would hide the tables and the header.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||Well, I think i figured it out myself. But nonetheless. Thanks

##############################

Hey,
thanks for the fast answer.
But I'm quiet a noob regarding ReportingServices. How do I have to use "NoRows" ?
Is that a VB Code and if so, how do i use it ?

Mfg
Sven

Wednesday, March 21, 2012

Hi Need Help

I have an application in c#. Which is intended to give student with highest marks in each class.

There are 10 classes

The requirement is to find top student of each class and display it in columnwise like below

Class Student Name

Can anyone help me on that.

Thanks in advance

Hi,

Prepare the SQL Query which returns the Top 10 values from each class vise..

Select Top 10 Stud-ID,Stud_Name from StudentTable where StudentClass = UserParameter;

Write the C# Method which accept the One Parameter from the User and return the result set.

public DataSet GetTopTen(string strClassParam)
{
ds = new DataSet();
if (ObjCon.State == ConnectionState.Open) ObjCon.Close();
ObjCon.Open();
string strQuery = "Select Top 10 Stud-ID,Stud_Name from StudentTable where StudentClass ="+strClassParam; (Change the Query according to your need..)
sc = new SqlCommand(strQuery, ObjCon);
sda = new SqlDataAdapter(sc);
sda.Fill(ds);
ObjCon.Close();
return ds;
}

Biind the Result Set to the DataGrid or Gridview to show it.

That is it.

|||

hi,

i assume that u r geeting yr data from sql qury. if so, then u can get ur data by firing such query

selectdistinct class,studentnamefrom studenttablewhere mark=(selectmax(mark)from studenttable)

you can getthis by declaring dataset.u can bind gridview withclass and studentname bounded columns and assigning datasource to it like

gridview1.datasource = ds.tables[0].defaultview;

gridview1.databind();