A number field or currency amount field is required here in crystal Report - sql

Using VBNET2010 and A SQL Database and Crystal Report
I want To Calculate MIN,MAX,AVG of the fields of DataTable in column Fields
I tried Using
Average({DataTable1.Column2})
I tried Using
MINIMUM ({DataTable1.Column2})
I tried Using
Maximum({DataTable1.Column2})
Generate this Error message while in the processing of creating it:-
A number field or currency amount field is required here
Please help me, I need your help.
Thanks,
Or guide me how Get Min,Max Average in crystal report when i am using datatable as a source.

hey hey I got the Answer
for This You Have To create TWO formulas in Formula Editor
1.To convert the Datatable column to Number with Name avg
ToNumber({DataTable1.Column2})
And Second To Convert That number to AVG/MIN/MAX
Average ({#avg})

you want to limit the report data set of the report to the maximum date per group?
in the select expert clcik on the Show formula box.
There is a Group Selection toggle.
Switch it group selection
put your group selection criteria in there Maximum(DataTable1.Column2,group)

Related

Crystal Reports dynamic group summary

I'm trying to figure out a way to dynamically create a report summary that lists the totals of instances for each account dynamically at the beginning or end of the report. An account will only show up on the report if that account had any instances in the date/time range established by the Start/End date parameter fields, so every account will not always show, hence the dynamic part of the problem. There is surprising sparse information on how to do this from what I've found. Any ideas would be appreciated.
Use Insert, CrossTab...
Select Account as the row and select the value you wish to summarize.
There are many other options if you look into CrossTab features...

Bizagi create dynamic combobox

Guys!
I'm working on a project with Bizagi Suite - Version 11.1. I'm new to it and I will really appreciate your help, because I'm having a hard time creating a dynamic combobox control.
So my case is the following:
Data Model: 3 master tables: Program, Order and Order-Program (m-m relationship). In table Program users fill out year, positions and amounts for each position. In table Order, they fill out info about the order and they have to specify from which program they want to take the money out for the order. The Program itself has a lot of records with different positions and amount. And I want when the users fill out the order to select the year, the position and the amount they want to take out of the program. So I need to have a dynamic combobox for the field 'position' which loads when user select year.
In other words I need to load combobox with filtered records of master table.
Do you have any ideas how I can do that?
Thank you in advance!
Best regards,
A.Mincheva
You must define your combobox with the full content of the master table.
Then ,you can define a Filter expression to dynamically filter the combobox content.
In the filter expression, you need to retreive the value of selected Year with XPath and use this value to filter the records.
In the form designer, you go to "Actions & Validations" to define the following action :
When "Year" changes <=The display name of the input field
Then Refresh "Program" <=The display name of your dynamic combobox

Average of two columns in crystal report using crosstab

I cant get the right Sub Total and Total of this formula
Output is
Formula is ((collections / collectibles) * 100)
Is there a way to change the formula of Sub total and of a column?
I'm using crystal report in vb.net windows application program
This is for simple detail section
Create a "Formula Field" (Not a running total field) called Total
In the Formula Editor grab "Functions" (Middle divider) -> Summary -> Sum -> Sum(fld) and put it in the editor portion
Drag the "Amounts" that you want the total of and and put it in the Sum function
Put this formula field in the footer (It should display the total I believe you want)
Please check this link.
https://www.mindstick.com/Articles/614/running-total-field-in-crystal-report
http://www.dbforums.com/showthread.php?1117914-subtotals-by-page
Edit
If you using cross-tab, then its very easy. Cross-tab given row wise, column wise total and grand -total too.
check this links.
Grand Total Cross Tab rows alongwith columns?
Add "Total" per row and column in Crystal Reports without CrossTab

How to program crystal report to lookup a record in a table

i Have a Table with Fields
Material Number
Order Code
Supplier Code
Description
I have a crystal reports rpt file that i manually enter all the information to generate labels.
I am trying to program this using the built in formula editor, so when i enter the Material Number (which is a unique code) it will automatically display other 3 relevant fields.
I have tried few formulas in the formula editor without any luck.
can anyone help?
relliK
UPDATE
#Siva - I have added the table for clarification
i simply want a lable printed with only one user input being the Material Number, and then the code/fomula in crystal reports to fetch the other data based on the Materila number and produce the label.
thank you for you interest in this issue.
UPDATE
#Siva - I have added a sample label, i would only want to enter 20506871 as Material and the other data fields to be pulled from excel
not sure if i can use parameter fields and/or i would like some help on programming the parameter fields

SSRS 2008/2012 - ADDING AGGREGATION FIELDS

I'm attempting to add a field to an SSRS report based on 2 other displayed fields.
I'm using a matrix report
Field One is a Count of Account numbers
the Second Field is an Order Amount
My Attempt
New_field=(Sum(Amount))/(Count(Account))
What is the best way to do this in SSRS. Because one cannot have Aggregate functions in SSRS.
A second and related issue is Percent increases. What would be the best way to generate Percent differences in a new column.
Notes:
1. The report is fueled using a SQL Stored Procedure.
2. Graphical Display vs tabular are acceptable
Thanks
You can simply put your formula in query and give it an ALIAS. I've also use CASE statement to catch the error when Count(Account)=0.
SELECT
CASE WHEN Count(Account)=0 THEN (Sum(Amount))/(Count(Account)) END AS New_field
FROM TableName