Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Reports WinForm
have made a winform and as i am a learner started c# quite few months ago i have a need of creating reports so i created a reports using wizard but now i have a need of chaging the reports. so i thought up of building the reports not with the wizard but with the code so that i can change the query
select * from table1
and the second query for the next reports as
select * from table2
. so that i can put the searching facility in my reports.but i have googled out and i cant find any reports componenets. means what component are required for developing reports. like if it use dataset or datatable. an example will help me to build. sorry for my bad english as i am weak in it.
Posted 28-Mar-13 20:05pm
sariqkhan1.4K
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

  Permalink  
Comments
Menon Santosh at 29-Mar-13 2:00am
   
nice solution
sariqkhan at 29-Mar-13 4:44am
   
sandeep sir. in that two article where i can write the query?? is there any option that i can change the query?
Sandeep Mewara at 29-Mar-13 4:51am
   
If you really need it then for SSRS, you can define query using expressions. Easy would be to have two reports with static query and design - show the report as per need.
sariqkhan at 29-Mar-13 5:22am
   
sir i am using the windows form, not the webform and sir the query will be of depend on month so i dont want to make total 12 reports for each and every month
Sandeep Mewara at 29-Mar-13 5:25am
   
Then look for 'query via expressions in SSRS'
 
BTW, if everything (data columns) remain same and just the month changes, then that can be one parameter to one SQL query and one report. Why multiple query or report?
Just have a paramter (in where clause), pass that at runtime and show the data returned.
sariqkhan at 29-Mar-13 5:51am
   
is there any parameter option in SRSS??? i thought that will be only in crystal reports/
sariqkhan at 29-Mar-13 5:45am
   
is there any parameter option in SRSS???
i thought that will be only in crystal reports/
Sandeep Mewara at 29-Mar-13 6:08am
   
Yes, parameters are there in SSRS too.
See my previous answer to another post on it: http://www.codeproject.com/Answers/566259/Parameter-usage-in-report-viewer.aspx#answer1
 
For more, look here: http://www.codeproject.com/search.aspx?q=ssrs+parameter&x=0&y=0&sbo=qa&usfc=false
Deenuji at 29-Mar-13 9:25am
   
pls give some idea for my posted question
 
http://www.codeproject.com/Questions/569601/howplustopluscreateplusallocationplusandplusinputp
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

you need some basic of creating crystal report so first go through the following article
 
Creating Crystal Reports using C# with Datasets[^]
  Permalink  
Comments
sariqkhan at 29-Mar-13 4:42am
   
sir. what is this. in that article??
DBConnection DBConn = new DBConnection();
OleDbDataAdapter myDataAdapter = DBConn.getDataFromDB();
Menon Santosh at 29-Mar-13 5:43am
   
DBConnection is a class, and getDataFromDB is a function which return dataadapter, you better download the code to understand it well

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 587
1 Sergey Alexandrovich Kryukov 479
2 Maciej Los 305
3 Mathew Soji 195
4 Richard MacCutchan 145
0 OriginalGriff 7,356
1 Sergey Alexandrovich Kryukov 6,712
2 DamithSL 5,461
3 Manas Bhardwaj 4,916
4 Maciej Los 4,475


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 29 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100