How to Format Number field in Crystals Reports - crystal-reports-2010

I have created a DataSet, in my projet, that is linked to my Crystal report. Howhever, when I run the application there is decimal with numeric fields. How can I remove them?
In DataSet I have changed the datatype to Int32.And when I take mouse over the field in crystal Report it show (string). How can I fix it.
Thanks....

Related

Crystal Report not filtering SQL records based on selection formula

unfortunately I'm not an expert of Crystal Report, so I'll post here my question hoping for any help about my issue.
I want to display inside my report the result of a filter on a SQL RecordSet; this RecordSet is looked up from an a single table, of which I want to show some fields of my SQL table, while the filter I want to apply is based on a field parameter (defined static) that I'm trying to set programmatically.
Here below I attached my code where I'm applying the record selection formula, I tried also hard-coding the value instead of passing it through a dropdown selection:
ReportDocument RPT_Doc = new ReportDocument();
RPT_Doc.Load(RPT_Path_Name, OpenReportMethod.OpenReportByDefault);
ApplyConnInfos(ref RPT_Doc);
RPT_Doc.SetParameterValue("data_riferimento", "20161001");
RPT_Doc.RecordSelectionFormula = "{viaggi.data_part_pre} = '20161001'";
crystalReportViewer1.ReportSource = RPT_Doc;
In the first image attached you can find the field parameter definition, while second image is the record selection formula I defined inside my report:
The report always shows all the records of my table (more than ten thousand rows), instead of displaying a filtered RecordSet. The odd thing is Preview function from Visual Studio works like a charm; it prompts the field value, once I confirm the value the viewer displays the report with the rows filtered as I expect..
What am I missing from report/C# program configuration to make the record selection work?
Thank you in advance for any suggestion you can give me :)
Leonardo
Ok, finally we got the solution to our issue.
We found the CrystalReportViewer object used to display generated reports has 2 different properties, SelectionFormula and ViewTimeSelectionFormula; both has default value set to empty string.
Below I attached the picture of .Designer.cs file with the 2 properties valued:
We commented those 2 properties and the selection formulas and field parameters applied through code / report designer worked again.

Can't return records in Crystal using Crystal Report Date Range and an Oracle DateTime field

I may be going about this all wrong, which is why I am reaching out. I have a Crystal Report that uses an Oracle database as a source of data. I wrote a command to grab the needed records from the database. Then I am using two Crystal Report Date parameters to create a range. The date that I am checking for existence within the range in my Record Selection is an Oracle date, which is showing up as a date time. I have tried using CDate, CStr, and Date but I cannot get data to display. Now if I remove the parameters, I can see data. But they need to be able to use the range. Is this "truly" possible??

How can I get a date entered in a VB6 application to display on a Crystal report?

I have a VB6 application where a user inputs a date range and the dates are used to populate a Crystal 8.5 report using a selection formula within the VB6 code. I need to display the date the user selected on the report. Since the date is technically not a parameter, I am not sure what I can put within the field object/formula field to get the date from the application. Any and all help would be greatly appreciated!

How do you show all rows with missing fields in Crystal Reports?

I'm struggling with Crystal Reports suppressing rows whenever I add a field that some rows may not have data in.
I've been able to fix some of the rows and make them show by using the formula:
if not isnull({field}) then {field} else "Arbitrary string to make row display"
This at least fills in the absent field with something and displays the row.
Do I really have to try and identify every field that may have incomplete data for some rows? Or is there some global method to make all rows show no matter what?
Something like: If isnull(ANYTHING) then " "?
you can do right click on the field, then under suppress, click the formula icon beside it and you can input there the conditions.
You can try the following in report options:
Convert Database NULL values to Default
Convert Other NULL values to Default.
This is hidden in File > Report Options. I have used Convert Database NULL Values to default to show 0's instead of blanks for null valued summaries

SSRS - Calculated field using column from other DataSet in Matrix (cross-tab)

I have several DataSets in an SSRS report. How can I use a summed matrix (crosstab) column from one DataSet in a formula of another DataSet with the same data fields (just different selection criteria (categories differ)). When I specify that field in the other DataSet, it only gives me First every time (I did not use First()); it does not automatically move them with the crosstabs in the second DataSet.
You cannot do this in SSRS 2008. This capability is first available in SSRS 2008 R2. Depending on how you use the data in the report layout, you might be able to use the ReportItems collection to get a value. For example, you can use the contents of Textbox1 with a field in a different dataset (field called MyColumn1) in an expression like this:
=ReportItems!Textbox1.Value + Fields!MyColumn1.Value
The ReportItems collection uses the value of a textbox after the page is rendered, so you get the result only and not the raw data so you'd have to be using raw data.

Resources