Concatenate two fields - crystal-reports

I have these two fields in a dataset. How can I concatenate these in Crystal Reports to display next to each other?
select
CAST(T.GLTR_PSTNG_TYPE AS VARCHAR) REF_NO,
CAST(T.GLTR_DOC_CODE AS VARCHAR) GLTR_OUR_DOC_NO
from dom

You will need to create a FORMULA to concatenate these strings.
In the Field Explorer , right click the Formula Fields and select New.
It will prompt you for a Formula Name. Enter the name of your choice, and hit enter.
In the Formula Workshop screen select the 2 fields you require to concat from the Datasource, drag them down to the edit section. The formula should look something like this
{YourDataSource.Field1} & " " & {YourDataSource.Field2}
Click Save and Close.
Now you can drag the Formula Field onto the report to view.

Related

Changing filter type

My date filter looks like this
but i want it to be a dropdown menu like this
how do i do it? these are the only formats i can select
When creating the filter you must choose discrete dates instead of continuous. then you will have the option to display it as a dropdown menu.
This type of filter looks like this null column to add so drop down is not shown.so update the year values and got the year in show filter and then select the single value drop down. and edit the name in select year to show the drop down menu.
The answer by Littly will work,
One more suggestion is to create a small calculated field called year of Date -
which says -
YEAR(Date)
Put this new field in the filters and click on show quick filters and then you can select drop down and get the desired result.
The reason why this works is that, your field is now either a String column or an Integer column, it will be easily converted to drop down as compared to dates.

how to set number separated by comma in crystal report

How to set number in crystal report separated by commas.
There is a provision for thousand separator. But actually i need the number in the form like the below example.
Eg : 12,34,556.00
not like 1,23,456.00
What you probably want is Indian currency format i.e Lakhs and not Millions.
This is based on your culture information.
You can use a formula to format each field. Right-click on one of your numeric fields, select "Format Field" and select the Common tab. Click on the formula (X+2) button to the right of "Display String" near the bottom and enter a formula like:
CStr (CurrentFieldValue, "#,##,##,##,##,###.00")
Give this a try and see if it displays correctly.

strange crystal report summation issue for columns

I am trying to sum all the column value and want to display a summary. I am choosing Insert -> Summary -> Column name and Sum.. But rather then showing sum it is counting the rows and displaying the rows. Kindly please suggest some solution. I am available here if some one need for more info to help please comment. (Sap Scn Crystal Report)
Are you sure you are selecting the sum option from the summary?, because normally this should have returned the sum of the values. As an alternative you can use a Running Total Field.
From the Field Explorer window, right click on the "Running Total Fields" and select "New".
In the window that will appear, on the left side you will see the available tables and fields. From there select the field that you want to sum up and press the top ">" button.
As a type of summary select "sum", type a name for the "Running Total Name:" and press OK.
Drag and drop the new Running Total Field on a section of your report.

Is there a way to select records from text parameters after run time in Crystal Reports?

I need to design a crystal report with 3 columns. Column 1 is a text box in the report, and column 2 and column 3 are datafields from a particular table.
Is it possible for me to use column1 as a parameter that would help me to fetch the other columns from the database??
col1 col2 col3
TextBox value1 value2
so when a user changes the value in TextBox, col2 and col3 value should reflect based on textbox value.
Or is there any other way in which i can achieve this??
There is no way to interact with a report the way you want via text boxes after the report has run. Since you can't select records on the fly, you'll have to create a report parameter of the same type as your primary keys (column A) and then set it to "Allow multiple values". You'll be able to select only the records you're looking for at run time by adding {table.colA} in {?Parameter1} into your Record Selection formula.
Drop {table.colA} and {table.ColB} into the Details section of the report. Now when you run it you can just add your 15 items as the parameter and you'll get what you're looking for.
Alternatively, if its important for the user to interact with the report after it's presented, you could accomplish this using (1) sections/grouping and Crystal's Hide option or (2) an on-demand subreport.
For example, you could group by column1, and then print a detail section for all the values. Mark the detail section Hide. Then, when you click on the value, that section will expand.
Or instead of marking it Hide, mark the group footer (for column1) New Page After Section. Then you can use the document tree along the left side to navigate to the page containing the values you're interested in seeing.

Fetch Cross-tab grandtotal?

I have a cross tab inside a subreport. I need to fetch the grandtotal of cross tab and display it in a textobject under the cross tab. Any clue how this can be achieved ?
Drag and drop the database or formula field you want into the detail section of the report. (Remove any unwanted guidelines / column headings that this generates.)
Right-click the inserted detail section item and select Insert > Summary... . Specify Sum, to be inserted in the same section as the datagrid is located. (Remove the detail section item, if you don't want it in the detail section.)
The total field can be dragged and dropped into position under the data grid. If you specifically want it in a text field, then insert a blank text field into the report under the data grid and then drag and drop the total field into it.
Do you have any criteria or special formula in the crosstab? If not, then you could probably just make a new formula sum({table.field}) and put it wherever you like.
(If this subreport is grouped, you may want to use sum({table.field},{table.group}))