Report Abc- Example
Excel Format 2007 (I have to acheive this below format)
Job Number : 123________ Job Date : ___________ Destination : ________
_________________________________________________________________________________
Voucher No. | Voucher Date | Expence | Income
_________________________________________________________________________________
100 | 21/May/2021 | 100 | 50
101 | 20/may/2020 | 200 | 100
_________________________________________________________________________________
Gross Profit : -150 Total | 300 | 150
_________________________________________________________________________________
_________________________________________________________________________________
Job Number : 124________ Job Date : ___________ Destination : ________
_________________________________________________________________________________
Voucher No. | Voucher Date | Expence | Income
_________________________________________________________________________________
105 | 21/May/2021 | 100 | 500
109 | 20/may/2020 | 500 | 500
_________________________________________________________________________________
Gross Profit : 400 Total | 600 | 1000
This Job Number and Voucher No. Shows multiple(N) time...... This my Datatable coming From Database...(Original Data)
JobNo | JobDate | Destination | VoucherNo | Voucher Date | Expence | Income
--------------------------------------------------------------------------------------------
123 | India | 100 | 21/May/2021 | 100 | 50
123 | India | 101 | 20/may/2020 | 200 | 100
124 | Canada | 105 | 21/May/2021 | 100 | 500
124 | Canada | 109 | 20/may/2020 | 500 | 500
---------------------------------------------------------------------------------------------
I have Tried this ...I'm able Change Datatable..as Below
JobNo | JobDate | Destination | VoucherNo | Voucher Date | Expence | Income
--------------------------------------------------------------------------------------------
123 | India | 100 | 21/May/2021 | 100 | 50
123 | India | 101 | 20/may/2020 | 200 | 100
------------------------------------------------------------------------------------------------
Gross Profit: -150 300 600
----------------------------------------------------------------------------------------------
124 | Canada | 105 | 21/May/2021 | 100 | 500
124 | Canada | 109 | 20/may/2020 | 500 | 500
---------------------------------------------------------------------------------------------
Gross Profit: 400 | 600 | 1000
---------------------------------------------------------------------------------------------
I have Export the Data as Below Format.......
Report ABC From ABC Date to XYZ Date
JobNo | JobDate | Destination | VoucherNo | Voucher Date | Expence | Income
--------------------------------------------------------------------------------------------
123 | India | 100 | 21/May/2021 | 100 | 50
| | 101 | 20/may/2020 | 200 | 100
------------------------------------------------------------------------------------------------
Gross Profit: -150 300 600
----------------------------------------------------------------------------------------------
124 | Canada | 105 | 21/May/2021 | 100 | 500
| | 109 | 20/may/2020 | 500 | 500
---------------------------------------------------------------------------------------------
Gross Profit: 400 | 600 | 1000
---------------------------------------------------------------------------------------------
But I want to acheive this ..
Job Number : 123________ Job Date : ___________ Destination : ________
_________________________________________________________________________________
Voucher No. | Voucher Date | Expence | Income
_________________________________________________________________________________
100 | 21/May/2021 | 100 | 50
101 | 20/may/2020 | 200 | 100
_________________________________________________________________________________
Gross Profit : -150 Total | 300 | 150
_________________________________________________________________________________
_________________________________________________________________________________
Job Number : 124________ Job Date : ___________ Destination : ________
_________________________________________________________________________________
Voucher No. | Voucher Date | Expence | Income
_________________________________________________________________________________
105 | 21/May/2021 | 100 | 500
109 | 20/may/2020 | 500 | 500
_________________________________________________________________________________
Gross Profit : 400 Total | 600 | 1000
This Job Number and Voucher No. Shows multiple(N) time......
I'm Getting Data From Sql Server as Database..
I have using asp.net 3.5 framework...please don't suggest any ddl..i have not right add any ddl file add at client Side....
How can i achieve this ...any help will be appreciated....Thank U!!
Ok, this is one of those problems in which MORE thinking then doing is the solution!
First up, you have some data that is NOT really columns, and then inside that, you want a grid of data.
so, we simply have to group our data by JobNo.
And since this is NOT really columns, but some text data, then a repeater control is the job for that task.
Now, inside of the repeater, we need that table/grid like. So inside the repeater control, we drop in a gridview.
So, our markup will look like this:
So the repater is our "heading area", and inside we have the Grid.
So, on page load, we fill the repeter, and for each repeater row event, we fill out the grid.
So the code looks like this:
Edit: - this post was not tagged as C# - so I posted as vb.
However, as c#, the code would look like:
And the output looks like this:
Now in above, I just had the data in a table. It not clear how/where/when/what your data is being imported into. But get the data into a data table. If you only have one table, and can't use SQL group by, then simply make a 2nd table, and loop out the JobNo into that table, and bind that to the repeater.
The approach, the concept, the idea here?
Your heading part and text is the repeater control - since it not really a table.
Then the grid part/table? That can be the grid view. You fill it for each group row, and then of course total up the results and shove that into the footing row.