1

Is it possible to create fields on a report? In SQL I was able to do this fairly easily.

An example would be:

Item ---- Qty ---- price --- total (qty*price)

Do I always need to have total on the object or can I create a non-grouped-by report and have a calculated field?
If I need to put it on the object, is there any reporting tool used where I can base a report off of a SOQL procedure?
Or how can I get more robust reporting in SalesForce?

1

The easiest solution is to create a formula field on the object.

If you need more robust reporting, Apsona Multi-Step Reports offers a lot of great functionality, like joined reports that are actually useful, and javascript functions for calculated columns.

3
  • excellent. I'll look into that plugin. The formula field on the object seems kinda messy from a database design perspective. – tjcinnamon Dec 1 '15 at 19:15
  • One thing you need to do with working with Salesforce is throw out some of your ideas of database design. JOINs aren't an option, so forget about them. Formulas are not really stored in the database, they're calculated on display, they just "live" on the object. – Christian Carter Dec 1 '15 at 19:48
  • 1
    You can also do some pretty cool things with Conga Composer plus Conga Excel templates - merging multiple SFDC reports/SOQL queries into a single workbook that in turn can do pivot tables and all the other Excel-based formulas. – cropredy Dec 1 '15 at 21:10
1

Do I always need to have total on the object or can I create a non-grouped-by report and have a calculated field?

Report formulas only work on aggregates, including SUM, MIN, MAX, and AVG values. If you tried a report formula for your example, you'd end up with something like SUM:Quantity * AVG:UnitPrice, which would obviously lead to incorrect results unless you grouped by UnitPrice.

If I need to put it on the object, is there any reporting tool used where I can base a report off of a SOQL procedure?

You do need to put a field on the object for per-record calculations. You may need to build a "Custom Report Type" in order to get additional fields/objects than what standard reporting allows. Finally, you can also go to the Developer Console, click on the Query tab, and type in a direct SOSL or SOQL command and get output, which I often use to get meaningful statistics without the hassle of a UI. However, larger queries may time out, as the console only waits a few seconds before declaring "no response from server." It depends on the size and complexity of the object and query in question.

Or how can I get more robust reporting in SalesForce?

If you still can't get the desired results using custom report types, joined reports, or the Developer Console, then you'd have to turn to alternative reporting engines, such as Crystal Reports (standard disclaimer: I do not endorse any specific products, and have never used nor been employed by the linked company). You may also find that simply exporting to Excel may be beneficial in some cases, using a combination of the Excel Connector and pivot tables/charts/etc.

1
  • I'll take a look at some custom report types. If those don't work I'll look at some of the other reporting options' – tjcinnamon Dec 2 '15 at 20:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.