Summarize the fields in Crystal Report - c#

i have a column name "totalcost" , the datatype is nvarchar.. it accepts numbers and the word "Not Applicable"
is it possible to SUMMARIZE that column?
i have a problem because all data in this column are not all integer.

You can create an formular field to clarify your value, set it's value to 0 if "Not Applicable". Then, Summarize on new formular field.

Related

unbounded field in crystal report by pass parameter at runtime

I have a report in crystal report.
In that report, I need to set the field to 'Go' if the value is 0, and set the field to 'NoGo' if the value is 1.
I have created an unbound field string and write formula as below:
if {?idline}=1 and tonumber({bevarage;1.torque})=0 then {#UnboundString2}='Go'
else if {?idline}=1 and tonumber({bevarage;1.torque})=1 then {#UnboundString2}='NoGo'
but this is not working and always returns an empty string from unbounded field.
Please help me to fix it.
Assignment operator in Crystal is := rather than =
Why not simply create a formula that depends on the parameter?

TableAdapter.Update(DataSet) makes cyrillic letters appear as question marks in dgv

I have an application that consists of a DataGridView and a few buttons to manage it more easily (it is about managing gym subscriptions). I add the row to the DataGridView like this.
DataTable dataTable = ((SubscriptionsDatabaseDataSet)(tableBindingSource.DataSource)).Tables[0];
dataTable.Rows.Add(new object[] {id, name, dateMade, expiryDate, daysRemaining, sessionsRemaining, cardType});
and after that, in order to save the data to the database I do this:
this.tableTableAdapter.Update(this.subscriptionsDatabaseDataSet);
this.tableTableAdapter.Update(this.subscriptionsDatabaseDataSet.Table);
The card type is in cyrillic and it appears fine if I do not call tableTableAdapter.Update(), it only gets broken and appears as question marks after I call the method.
Q: What's the data type of the column in database?
A: VARCHAR (MAX).
You should change the type of the column to NVARCHAR(MAX) to support variable length unicode data.

Special field record number in crysal report not show when record does not exist

I am using crystal report asp.net visual studio 2012. I am showing table format data in crystal report and I am using special field record number as serial number but problem is when data not exist special field record number show 1.I want record number not display when data is not available.Which formula i will write to get rid of this problem.
I am getting following result when data is not available
SR NAME
1
I do not want record number
on your section expert under suppress condition you can write something like isnull(Name) or Name = "". Once that condition is true, it will suppress the entire row.

Crystal Report Crosstab String Data

I have a datatable that looks like this (all columns have string datatype)
firstCol secondCol thirdCol
1_str1 1_str2 5,1
2_str1 2_str2 5
3_str1 3_str2
.... .... ....
note that on the thirdCol, some fields are blank.
as for the crystal report, I have used the cross-tab feature
Columns: firstCol
Rows: secondCol
Summarized Fields: thirdCol
The columns and rows are okay. The only problem that I have is the summarized fields.
As far as I have searched, it is only used for numeric data (correct me if I'm wrong).
I even created a sample datatable and bound it on the crystal report. Instead of string, it displays the "numeric" (or you may call it integer, decimal, etc) datatype which is not what I want. Is there any way to display it as a string ?
this is the actual datatable
and this is the crystal report cross-tab output
nevermind the total column and row on the crystal report output. I just want to display "5,1" and "1" on the cross-tab, not the numbers.
Sure, you can display the summarized field as a string. When you created the crosstab, the default summary function is count() which is what you're seeing. Instead, go into your crosstab, select your summarized field, and hit the 'Change Summary' button. Instead of count you can use minimum or maximum (interchangeably, since I'm guessing that you will ever only have on entry for each row/column combination).
Once that change has been made, "5,1" will display for HCC and "5" will display for Legionella on Feb 14, and all other summarized fields will be null.

Computed Column Based on Other Columns

I have a Dataset with a Bunch of Columns used in a Report (DevExpress XtraReports) (DataSet being the DataSource). The Dataset has many columns, and i need to read a column (based on the row type), and decide which column value to read for the row, and apply formatting based on the row type.
Example:
DataSet
DataType IntValue RealValue StringValue DateValue
Int32 123
DateTime 1/1/2011 1:23 AM
String XYZ
...
If the Datatype is DateTime, i need to read the DateValue column value, etc
I know we can use DataSet Expressions on computed columns, but cant find a way to apply the required Expression, and Format Data for the Report.
Is there a suggested way to handle this in the Report or at DataSet Level (excepting the formatting part)?
I'm not sure why you are taking this approach. This dataset is filled from a SQL datasource or some sort of backend? if that is the case, why don't you just get the computed column in the right format from the SQL directly? Wouldn't be a performance overhead to loop through all records to try and compute the "right" column?
Since it is a report, wouldn't displaying the data be enough? if you really need to use the type, you can bring that from sql as well, so you end up only with two columsn, type and data. If you can elaborate a little bit more on what you are trying to do, it will be helpful.

Categories

Resources