Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

issue with exporting into Excel

Status
Not open for further replies.

chicken65

Programmer
May 14, 2012
3
US
thread767-1499586

Hello All,

I created a report in Crystal ( version 11) with six sub reports. When I am exporting this report into excel I choose Microsoft Excel 97 - 2000 ( because If I choose data only sub reports data is displaying in next row ) Data is exporting fine, but EXTRA COLUMNS AND EXTRA ROWS are displaying in excel Sheet. Could any one know how to fix this. Please help me I really appreciate your time and help.
 
I have had the same problem and could never successfully use any of the Excel formats for export, even after following lbass' suggestions in the thread that you linked. The only thing that works for me is to export the report to a tab delimited file and then import it into Excel. A bit more work but no more extra columns and rows.

 
I've had some success by adding blank text boxes that give a standard layout to each section. But never with anything as complex as six subreports.

Is it possibly to used Shared Variables to pass the data back and show all the data in the main report?

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
I have been successful using Madawc second suggestion. I pass the shared values to the main report. In the subreports you'll need to supress all the sections, put the subreports in 'detail section a' and in the section expert, supress blank section. Format the subreports on subreport tab to 'Supress Blank Subreport'
Then put all your fields to be exported in 'detail section b'
 
In addition, I usually need to create a reset formula to set all the shared variables back to 'blank' or zero. Put that in detail section c and supress that section. This will prevent repeating the previous record's values if the subreport can't find a match in the current record.
 
Thank you all for your responses. andymc, could you please tell how to reset formula and shared values into main report. I suppressed all sections of the report only detail and headers are displaying . and subreports are in detail section with same height as main reports fields. Any help is really appreciated.
Thanks again for your time.
 
You can reset a variable using a Formula Field that sets it to value, placed in some suitable section.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
Make sure both column labels and detail fields are attached to the same guidelines. Don't use "can grow". When you export, make sure that you area selecting the section for column width that has the guidelines set up as desired. This does work--I do it all the time. You need to test the guidelines to make sure all fields are moving together. Remove extra guidelines from the ruler. Also magnify the view and make sure there is no white space vertically or horizontally within the sections.

-LB
 
Thanks you very much lbass, added guidelines (View ---Guidelines ---check ) to the report and uncheck the can grow propertie. seems like I am close, because in main reports data is exporting in to columns a, b,c,d,e,and F from here one extra column is displaying this is from sub report.
How do I fix this one and also extra two rows are displaying for each record. I also magnify the view and I can see only report header, page header, detail, report footer and page footer. No Extra space or no extra lines. Could anyone tell me how to fix this. I really appreciate your help.

 
You must make all fields in the rows the same height, including the subreport by choosing "select all fields in section" and then format->same height. Then move them upward to the top of the section and bring the bottom of the section up. You need to test the guidelines by moving them to see if everything is connected. Althought it is a bit harder to do, the subreport itself MUST be attached to both vertical and horizontal guidelines as well. Make sure you are using the regular export, not data only.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top