Click here to Skip to main content
13,000,742 members (57,806 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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 19:05pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Menon Santosh 29-Mar-13 2:00am
nice solution
sariqkhan 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 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 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 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 29-Mar-13 5:51am
is there any parameter option in SRSS??? i thought that will be only in crystal reports/
sariqkhan 29-Mar-13 5:45am
is there any parameter option in SRSS???
i thought that will be only in crystal reports/
Sandeep Mewara 29-Mar-13 6:08am
Yes, parameters are there in SSRS too.
See my previous answer to another post on it:

For more, look here:
Deenuji 29-Mar-13 9:25am
pls give some idea for my posted question
Rate this: bad
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[^]
sariqkhan 29-Mar-13 4:42am
sir. what is this. in that article??
DBConnection DBConn = new DBConnection();
OleDbDataAdapter myDataAdapter = DBConn.getDataFromDB();
Menon Santosh 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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170624.1 | Last Updated 29 Mar 2013
Copyright © CodeProject, 1999-2017
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