C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






Crystal Report tips (Combine Fields, Sums, etc)


Posted Date: 07 Sep 2008    Resource Type: Articles    Category: General

Posted By: Mohammed Yahiya       Member Level: Silver
Rating:     Points: 10



Few years before when i designing my access reports i have to write many lines of codes to get sums, sorting, combining table fields etc.,. once i started using Visual studio only few lines of code is enough. If you have vision you can write code anything. Crystal report is coolest reporting tool i have ever seen. I have designed many reports using crytal for my application. This article give you some ideas how to combine table fields, how to get Customfield sum, Custom sorting order.

Here first we start with combine multiple fields. Imagine your have display 3 fields from your 3different table in your database.


totext({table1.field_ID}) +":"+ totext({table3.field_Itemno})+":"+
totext({table2.field_qty

Above example output will looklike
111000:12345:15
the first one is field_id from table1, second one is field_itemno from table3 and last one is field_qty from table2. In between i have used special charector (:) for seperate from one field from another.

(Note: Field_id is name of the field in table1)

Next we are going to see how to sum custom field. Its already inbuild sum function is exist. But you cannot use that function for customize field. So you have to use formulas. Here we can see one example for total cost
Imagine you have few product in your table you have to calculate cost according to custom pick qty. User have to create item by item, then total for all picked item.
Here is first we can see how item cost depend on selected qty. Please add in formula

{Purchase.PickQty} * {Purchase.POUnitPrice}

Then you can calculate for page total. For that you have to use running total for the page. If you want know how to please google it.

// Prints the cumulative value of the RunningTotal variable

WhilePrintingRecords;
NumberVar RunningTotal1;
RunningTotal1;







Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Crystal Report tips  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: windows keys
Previous Resource: Asp.net Basics
Return to Discussion Resource Index
Post New Resource
Category: General


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

teleconferencing

Contact Us    Privacy Policy    Terms Of Use