Is it possible to adjust the amount of columns (left to right) in Crystal Report based on user input? - crystal-reports

I am trying to get crystal to print the details field from Left to Right to an excel spreadsheet output, rather than from the top of the page to the bottom. Setting the details section to 'Format with Columns' and using the layout option of 'Across then Down' doesn't seem to acheive the effect I am looking for. I want to create a given number of columns to the right based on user input passed into Crystal parameters, but I can't seem to find anything within crystal reports that will allow this.
Is it possible that I'm missing something simple, or does Crystal Reports lack the functionality to accomplish columns/rows being generated from left to right rather than up to down?
Thanks in advance for any help!

No such functionality in Crystal alone but you can take control of the Excel output logic using a UFL (User Function Library) allowing a detail-level Crystal formula to write to a specified Excel cell. As the formula progresses through the detail rows, it would increment column/row targets based on the Columns parameter.
You can create the UFL yourself. Alternatively, at least one of the 3rd-party UFLs listed here provides such a function.

Related

Formatting Excel Output of Crystal Reports with Multiple Subqueries

I've put together a summary report in Crystal Reports 2013 that has about 10-12 subreports. Each subreport is a fairly basic query that produces one or several lines rows and columns of data. I'm using SAP's Central Management Console to produce the reports, with the output an Excel output.
My problem is that my excel output is coming out unstandardized i.e. random extra empty rows and columns, data and header mismatches, different widths of rows and columns, etc.
I've been messing around with the formatting setting w/in Crystal Reports (standardizing size and shape of subqueries on the preview screen, supressing empty areas, etc.) but can't come close to getting the Excel output to look the way I want.
Is there a specific export formatting function/area within Crystal Reports that will allow me to design the export in the way I'd like? And if not, are there any ways to format multiple subqueries w/in Crystal Reports so their format in an Excel export is uniform?
If i really understood your issue, you have troubles with the alignment of data, cells and stuff like that in the spreadsheet, is it correct?
If so, the solution is to review the align of your fields in the report. It is very boring. You can use some functionalitis like:
right click a field and use "align to grid"
select two fields, right click and use "left align" and "top align"
change the property "gridsize" of the "report" to a higher value and use the keyboard to position the fields.
Avoid empty spaces between field at most.
Keep your eyes on the rulers.
Furthermore, check the version of Crystal Reports you are using. There is a good improvement about it from version 11 to 13.
Exporting to Excel seems a bit qwerky because the same steps do not necessarily work for all reports (my experience at least). Keep this in mind when reading the following steps. Perform the following steps on both the detail(footer if using grouping) and header rows where applicable:
Choose driver “Microsoft Excel(97-2003)”
Make sure the header and detail sections have no spaces in between the columns
Make sure the header and detail column boxes align perfectly (should see red crosses when alignment is correct).
Select all fields on the row, right-click, align to top (if this does try aligning to grid)
Right-click to the left of the detail columns and “Select All Section Objects”
Right-click in the same location and choose “Arrange Lines” then “Fit Section”
Perform steps 4 & 5 on the header columns as well
Open Section Expert, select “Suppress Blank Section” for all unused sections
If none of the above work, use driver “Microsoft Excel (97-2003) (Data Only) “
Headers will still appear in the report but will not be in bold

Grid/table in report

I need to display data in a basic grid, with borders, column headers, etc. How can this be done in a Crystal Report without having to draw every single line and position/size every field?
I've tried a lot of different things, but it is all so sloppy and time consuming. Isn't there an easy way to just display a table in a grid?
the solution here turned out to not use Crystal Reports. To use alerts in SAP BizOne. It works great for a quick well formatted data subscription case
A Crosstab can display results in a footer after the main report has been run. This is the least "time consuming" option, as you put it.
Otherwise the quickest way to turn an existing report into a "table" is to simply add line elements that span from the header to the footer, dividing your fields into columns. The line elements will resize such that they cover all sections:

Crystal Reports Subreport - Selecting data based on column clicked

I have a number of reports with current and ytd columns(summary totals by salesman). I want to be able to select the sub-report based on the column clicked. I have one sql procedure that selects current and one that selects ytd. I want to use the same report format (without having to copy and modify it) for current and ytd. Is there anyway of identifying what column is clicked?
Crystal Reports is pretty much just a reporting tool; it's not very interactive.
I'm more familiar with older versions of Crystal Reports, but as far as I know there aren't any onClick methods for columns that can be trapped using pure Crystal Reports.
Depending on how many columns you have, you can create a subreport for each column, but that may be prohibitively slow if you have a large number of columns you want to create subreports for.
If you're using C# or VB.NET to generate the report, you may have more options, but since the question isn't tagged with any programming languages, I'm going to assume this is pure Crystal Reports.

Crystal Report - Placing decimal point

I'm getting an integer value as 2345 but I want to display it as 234.5
is it possible??
To get what you are looking for in a simple fix is like what kingpin stated above. Divide the value by ten. To do this just create a new formula in crystal by going into your field explorer and right clicking on the formula fields section. Under there should be a option to create a new formula. Then in window that comes up put the field you want to manipulate in the formula and then divide that by ten. And there you go. Now use the formula field in the report instead of the original field.
Here is a example of how it could look.
{Table_Foo.value_Bar} / 10
There is a field property for it. Don't have access to crystal reports at the moment, but I know it's there:
Crystal Report Provides an easy to use default thousand separator for numeric Fields. You can use it by checking Thousand Separator from Field Properties.
If you need a customized separator, check Customized Thousand Separator in Crystal Report.
You also might want to find some tutorials on the Crystal Reports themselves if you still have trouble.

crystal report problem

what is the equivalant command like in vb for EOF(), MoveNext, Moveprevious commands in crystal reports
There are no equivalent answers in Crystal Reports, at least not in the versions I have used. Crystal Reports more or less simply dumps the data out into the report.
That said, if you are in a detail row, and you want to find out what the next value of a field will be, you can use:
next({YourColumn})
You can also find out the previous column value by using this:
previous({YourColumn})
Keep in mind that Next() won't work on the last record, and Previous() won't work on the first record.
I'll have to double-check, but I believe there is an OnLastRecord function that returns TRUE if you are on the last record.
First, welcome to SO!
Second, you sound new to Crystal Report's purpose is to display data, not perform the kind of calculations you're talking about. CR usually goes record-by-record through the data, displaying (or suppressing) each record, and adding group headers & footers.
To answer your question, LittleBobbyTables does give a few good pointers. To see the entire list of functions available to you, there is a list in the Formula Editor (see pic below). Press F1 for detailed descriptions of each command.
You can also:
Create a "Running Total Formula" that will evaluate each record and give a calculation in the group footer.
Do the calculations outside of Crystal Reports and only feed the end result in (perhaps with an unlinked join to your primary table).
The most complex option is to make a subreport that does the calculation and feeds the result back to the main report
Can you give us some more details about what you're trying to do?