Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Repeat Invoice for each company with stimulreport

I am using StimulSoft for my report in asp.net with c# language. I have a report with 3 list, one as Head list and two other list for detail. It's a bill report for range of date. The problem is that I can't repeat them in order I like; the following is the list and report I want :

HaedList >> BillId,Coname,TotalPrice,InvoiceDate
ServiceList >> BillId,ServiceName,ServiceCost
ProductList >> BillId,ProductName,ProductCost

The user will enter a date range, for example 2015/01/01 to 2015/01/03

--> Page 1

BillId=52 ---- CoName=Haaret

ServiceName=Repair,ServiceCost=12$
ServiceName=Cleaning,ServiceCost=2$

ProductName=DVD,ProductCost=10$
ProductName=CPU,ProductCost=60$
ProductName=VGA,ProductCost=40$

TotalPrice=124$
Tax=4$
Total >> 120$

--> Page 2
BillId=55 ---- CoName=GirBold

ServiceName=Training,ServiceCost=300$

ProductName=Pen,ProductCost=5$
ProductName=NoteBooks,ProductCost=10$

TotalPrice=315$
Tax=4$
Total >> 311$

--> Page 3

BillId=70---- CoName=DrillPort

ServiceName=Driver,ServiceCost=30$
ServiceName=Test,ServiceCost=10$

ProductName=Battery,ProductCost=35$
ProductName=Monitors,ProductCost=200$

TotalPrice=275$
Tax=4$
Total >> 271$

So I have 3 days in range, and I should print 4 pages in the following order. My problem is that the head repeats three times then All service Printed, and then product, and then the summary from head, like the following:

BillId=52 ---- CoName=Haaret
BillId=70---- CoName=DrillPort
BillId=55 ---- CoName=GirBold


ServiceName=Repair,ServiceCost=12$
ServiceName=Cleaning,ServiceCost=2$
ServiceName=Driver,ServiceCost=30$
ServiceName=Test,ServiceCost=10$
ServiceName=Training,ServiceCost=300$

ProductName=DVD,ProductCost=10$
ProductName=CPU,ProductCost=60$
ProductName=VGA,ProductCost=40$
ProductName=Pen,ProductCost=5$
ProductName=NoteBooks,ProductCost=10$
ProductName=Battery,ProductCost=35$
ProductName=Monitors,ProductCost=200$

TotalPrice=124$
Tax=4$
Total >> 120$
TotalPrice=315$
Tax=4$
Total >> 311$
TotalPrice=275$
Tax=4$
Total >> 271$

The following link contains three Image and Report Template I have made for my project.

The Sample and Three Image

Best Regards

like image 440
Eqbal Sohrabi Avatar asked Apr 01 '15 06:04

Eqbal Sohrabi


2 Answers

You should put BillId and CoName in Group Header and ServiceName,ServiceCost,ProductName,ProductCost in Data and TotalPrice,Tax and Total in Group Footer.

I do not have stimula in my system, but from template it seems that you did not have any Group Header or footer.

Also check that you send a correct query(with correct group by) to the report data source.

like image 89
Iman Avatar answered Sep 21 '22 20:09

Iman


It is actually easy.

Convert ("parse") your data into a native .net dataset (i.e. like http://www.dotnetperls.com/dataset) and use that to generate your report, by importing the dataset directly.

This has the benefit that can use T-SQL and/or link to manipulate the data in the dataset before the report generation. You can add an index column in the dataset which while it can be used for indexing internally, it can be "hidden" from the final report.

like image 31
Sotirios Avatar answered Sep 19 '22 20:09

Sotirios