Click here to Skip to main content
15,887,946 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Using Resource file in C# .NET Pin
Sandeep Mewara11-Jun-10 10:28
mveSandeep Mewara11-Jun-10 10:28 
QuestionSearch and Replace String Value Pin
AsianRogueOne11-Jun-10 4:01
AsianRogueOne11-Jun-10 4:01 
AnswerRe: Search and Replace String Value Pin
Rhys Jacob11-Jun-10 4:51
Rhys Jacob11-Jun-10 4:51 
GeneralRe: Search and Replace String Value Pin
AsianRogueOne11-Jun-10 5:04
AsianRogueOne11-Jun-10 5:04 
GeneralRe: Search and Replace String Value Pin
AsianRogueOne11-Jun-10 5:08
AsianRogueOne11-Jun-10 5:08 
GeneralRe: Search and Replace String Value Pin
Rhys Jacob11-Jun-10 5:21
Rhys Jacob11-Jun-10 5:21 
GeneralRe: Search and Replace String Value Pin
AsianRogueOne11-Jun-10 5:34
AsianRogueOne11-Jun-10 5:34 
GeneralRe: Search and Replace String Value Pin
Rhys Jacob11-Jun-10 5:56
Rhys Jacob11-Jun-10 5:56 
OK, so is the report a datagrid bound to the dataset created by this query?

Why don't you try something like this:

Create a view of your main query which returns all possible columns you might want to display on the report.

Then in your stored procedure have a parameter for each column you might want to filter on.

@col1 varchar(50) = null,
@col2 int = null,
@col3 bit = null

SELECT col1, col2, coln
FROM   view1
WHERE  1 = 1
AND    isNull(@col1, col1) = col1
AND    isNull(@col2, col2) = col2
AND    isNull(@col3, col3) = col3


Then depending on what the user has requested by drilling down, show/hide columns in the datagrid and pass in only the parameters that you want in the where clause. The isNull() will ignore any parameters you pass in as null and so won't take effect. If you want OR's you could run the procedure multiple times and join the datasets that are returned.
GeneralRe: Search and Replace String Value Pin
AsianRogueOne11-Jun-10 6:27
AsianRogueOne11-Jun-10 6:27 
GeneralRe: Search and Replace String Value Pin
Rhys Jacob13-Jun-10 21:43
Rhys Jacob13-Jun-10 21:43 
AnswerRe: Search and Replace String Value Pin
AsianRogueOne21-Jun-10 9:57
AsianRogueOne21-Jun-10 9:57 
QuestionScriptManager.RegisterClientScriptBlock issue Pin
trilokharry11-Jun-10 3:44
trilokharry11-Jun-10 3:44 
AnswerRe: ScriptManager.RegisterClientScriptBlock issue Pin
Sandeep Mewara11-Jun-10 6:48
mveSandeep Mewara11-Jun-10 6:48 
QuestionBind asp.net menu control with treeview Pin
yesu prakash11-Jun-10 3:21
yesu prakash11-Jun-10 3:21 
AnswerRe: Bind asp.net menu control with treeview Pin
Sandeep Mewara11-Jun-10 6:57
mveSandeep Mewara11-Jun-10 6:57 
QuestionExport data to excel in formatted way Pin
Karan_TN11-Jun-10 1:21
Karan_TN11-Jun-10 1:21 
AnswerRe: Export data to excel in formatted way Pin
Peace ON11-Jun-10 2:28
Peace ON11-Jun-10 2:28 
QuestionHtmlTabHTleRow Pin
siva45511-Jun-10 0:11
siva45511-Jun-10 0:11 
AnswerRe: HtmlTabHTleRow Pin
saini arun11-Jun-10 3:20
saini arun11-Jun-10 3:20 
QuestionLoading controls on page with UpdatePanel Pin
Łukasz Nowakowski10-Jun-10 23:50
Łukasz Nowakowski10-Jun-10 23:50 
AnswerRe: Loading controls on page with UpdatePanel Pin
Brij10-Jun-10 23:56
mentorBrij10-Jun-10 23:56 
GeneralRe: Loading controls on page with UpdatePanel Pin
Łukasz Nowakowski11-Jun-10 0:26
Łukasz Nowakowski11-Jun-10 0:26 
GeneralRe: Loading controls on page with UpdatePanel Pin
Łukasz Nowakowski11-Jun-10 0:37
Łukasz Nowakowski11-Jun-10 0:37 
GeneralRe: Loading controls on page with UpdatePanel Pin
Brij11-Jun-10 2:22
mentorBrij11-Jun-10 2:22 
QuestionCreating foreign key constraints through Sqlcommand.ExecuteNonQuery() Pin
vishnukamath10-Jun-10 23:28
vishnukamath10-Jun-10 23:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.