using crystal reports .net to report the modifications done in a table , recording/tracking application
I have to develop a recording / tracking application using crystal report .net . I开发者_如何学运维 have two tables in sql server 2005 express :
Product --will have all unique records
Columns are :
ProductID IDENTITY
ProductName varchar(100)
ProductPrice money
DateofEntryAdded DateTime
ProductModified --will have updated, deleted records which EXISTED IN THE PRODUCT TABLE BEFORE its RECORDS WERE UPDATED or DELETED
Whenever the user would update or delete records from the Product table, then i would first send all the records from this table into the ProductModified table, and then run the update query.
On the main page, the report would display all the records from the PRODUCT table:
ProductID ProductName ProductPrice Price_Add_OR_Modify_Date
1 Laptop $385 1 May 2002
2 I-pod $100
3 Bag $45
In the crystal report , i want that when the user double clicks on the ProductID =1 (using the Magnifier sign which appears on the Groups), then all the records from the ProductModified table where ProductID=1, are displayed.
ProductID ModifiedProductName ModifiedProductPrice DateofPriceModification
1 Laptop $385 1 May 2002
1 Laptop $430 4 May 2002
1 Laptop $470 8 May 2003
1 Laptop $500 24 May 2003
How do i do this? Should i have to use Grouping in the Crystal Report? Please help
Follow these steps:
- Insert Product ID, Product Name, Product Price, Price Add/Modify Date in Details section
- Select Product ID field, then select Insert | Group...
- Delete GroupName field; move the fields in the Details section to the Group Header section
- Optionally, suppress the Group Footer section
- Insert a second Page Header section (right click Page Header section, select Insert Section below)
- Insert the Product Id, ModifiedProductName, ModifiedProductPrice, DateofPriceModification fields into Details section (this should add the headers to the newly-created Page Header section)
- Insert a section Group Header section (like you did w/ the Page Header)
- Move header fields into this section; delete second, blank Page Header section
- Enter the following into the second Group Header field's conditional-suppression formula: DrillDownGroupLevel=0
- Hide the Details section
精彩评论