Rearrange fields in crystal report (in bulk) - crystal-reports

I have a report with about 20 fields and 1 group by field. When I create a new report and follow the wizard, it helps me create the complete report but all the field are really cramped in togather. They are not really usable in its default layout. I would like to rearrange them (increase size, and move them apart). Can I do that in Crystal Report by selecting multiple fields and change the size. Is there a work around?
Another option for me would be to have all the fields layout on page page sidwise and an top of eachother as if in a table. This actually does look pretty and professional except that headers are missing in this case. Since I am using group by and 1 group contains about 1-5 records, this layout really suits me. Any suggestion what you do when you too many fields in a Crystal Report. I am new to Crystal.

Yes, you can rearrange all the field into crystal report design. you can change the page size from portrait to Landscape. Default wizard provided you some default design. you can change all things after the completing wizard.

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

Report vertical layout

I have existing report w/ "groups" for Total/Directs/Warehouse/Credits that span horizontally. I need to now stack these groupings vertically. What is the best way to do this in CR? I am used to SSRS, Excel, PowerBI, etc. Crystal Reports is much less intuitive than those tools.
Do I need some kind of funky nested groups? Sub reports? How should we approach this? We assumed it would be a pretty simple formatting/layout change. But it looks like it's actually quite complex to do this.
Original:
How it needs to be re-worked:
If the entire table you're showing is in a Footer, you can just add 3 new footer sections and duplicate the table in each (removing any columns you don't need.) Just right click the relevant section and Insert Section Below.
Otherwise you'll need to use subreports. But since you have the columns already configured, all you really have to do is:
Save 4 subreports, Total, Directs, Warehouse, and Credits. (Just save a copy of your existing report, and delete everything that doesn't need to show up in Total. Rinse and repeat.)
Import each and add the parameters as subreport links
Give them each their own section

How to accommodate 100 columns in a single report?

Requirement:
I have one new requirement in Crystal Reports.
I need to show 100 columns in the report. I have tried using Landscape option but maximum I am able to accommodate are 20 columns.
Can someone have any idea on how can I accommodate 100 columns. Thanks in advance.
Practically it is not suggested to take 100 columns..as this can create an issue while monitoring the data in crystal reports
But if you still need to accompdate the 100 columns then follow below process.
go to File --> Page Setup --> there go to Unit --> for selected option give maximun size for Horizontal Component
This will increase the size of the report and now can insert required number of columns
Since this report is not for print and will be exported into an Excel format, just make your page as big as you need it. This can be done by going to "File" → "Page Setup" and adjusting the following things:
Check "Dissociate Formatting Page Size and Printer Paper Size"
Might as well flip the page to "Landscape"
Enter a large number in "Horizontal"
You should also note that because you're exporting this data (especially as "Excel - Data Only"), you don't need to make the columns wide enough to display; as long as the field is on the canvas they should show up as a column.
The size of the columns doesn't matter if you are going to export to Excel data only. So you can make the columns as small as you want, even if the report is not readable it will be exported OK.
If you want just to export some data and your report does not include subreports you can go without Crystal reports. Will be much simpler to set the SQL and preview data in a grid (which is scrollable) and then export it to Excel. It will look better too.
There are some tools that can do this and I guess you can easily find something on Google. I am using R-Tag (www.r-tag.com), which is free. You can see it in action here: http://www.r-tag.com/Pages/Preview_Demo.aspx

Crystal Reports: Cross-Tab Column Arrangements

I am looking for a way out in cross tab, so that if the columns exceed in cross tab, they shouldnt go on next page..rather a new cross-tab should repeat after the first one.
For example, two columns are displayed in a cross tab :
Now if a new column is added, and assuming that it could not be accomodated within the given page width limit, it will go to a page next to it in CR by default.
But in my report it is required to be shown below the first cross tab (and not on next page), which will look as follows:
Please do suggest me if there's a way out :)
Thanks in advance
Your question is perfectly reasonable, but I'm pretty sure that in CR-XI, there is no automatic way to do this. I recommend skipping the cross-tab designer completely and just making your own:
Make a new CR using a placeholder table that has exactly 1 record.
In this CR, suppress everything but the details section. Add a new details section so you will have Da and Db.
In Da, add a subreport. Use your real datasource and add Column1 and Column2.
In Db, add a subreport. Use your real datasource and add Column3 and Column4.
I don't have time to test this, but I think it will display all the columns as you requested.
(Instead of step 1, you can probably use a placegrouper group in your report that only has 1 group. Then, when you add the subreports, make sure to not add any links to the main report.)
Edit
A dynamic number of columns makes this request much more difficult to do in Crystal.
Maybe you could autogenerate the entire report from a script. I couldn't help you with that, but I'm sure someone else on StackOverflow will.
You can use MS Excel to achieve something similar. Use MS Access or something similar to set up a crosstab of your data. Open a new Excel workbook and import your crosstabbed datasource using Data->Import External Data->Import Data (this imports the entire table, regardless of number of rows). In Page Setup, change settings to Fit to (blank) pages wide by 1 pages tall. You can format the data however you like and the format will be retained. This Excel method will squeeze all your columns into a 1-page wide area. It's not quite what you're asking for, but it will work.
The number of columns may be dynamic, but do you know what the field names could be? For example, your columns include 0-50 US States, then you know what the column names will be, just not which ones or how many. If this is your situation, then use my first suggestion (check off the suppress if blank options to hide unneeded subreports). It won't be pretty (alot of white space), but it can get the job done.
A possible solution can be a multi column report. But it can be difficult to make the row labels and values in the same line.
If you can create an additional row grouping then you have the solution that you want. For example if your columns have number like in your sample. Then you can add a formula like:
columnId \ 2

Displaying a Tree Structure in Crystal Reports

Does anyone know of a way to represent a tree structure in Crystal Reports?
My big issue is that I don't know the depth of the tree. It is represented in a database table with a simple "childId -> parentId" relationship.
A perfect example would be to open Windows Explorer, and look at the directory tree on the left side. If anyone knows a way to represent that tree, then it'll work for what I need to do too.
My initial attempts have been:
1) to programatically (in C#) add Groups to the report. Unfortunately, you can't create a new instance of the Group class and add it to the Groups collection.
2) recursively nest the same report into itself for each level. In other words:
mainReport
subReport
subReport
subReport
subReport
subReport
subReport
etc...
Unfortunately, SubReports can't contain SubReports.
I really don't want to just add X number of groups into a report and hide the ones I don't need, because I'd have to add a fixed number of nested groups, but technically the data design can support an infinite depth, even though in practice we see up to about 5 levels of depth.
So, any other ideas?
Crystal XI added hierarchical grouping. You'll find this under the Reports menu. I put together a quick org chart report with n-level depth using this. The database table is like:
id
name
managerId
In the Crystal Report, you select these columns, group by id. Then under "Hierarchical Grouping options" menu under Reports, check off "Group Data Hierarchically", parent Id managerId, and indent appropriately.
The output is like the tree you described in Explorer.