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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting to Excel with Supreport (want on one line) 1

Status
Not open for further replies.

jccjill

IS-IT--Management
Feb 25, 2010
14
US
How can you export to excel when your report has a subreport - and you want the subreport information on the same line as the information in your report (by record).

For example: in crystal it appears

record 1info subreport info

but when you export it becomes

record 1info
subreport info
 
Please use the Advanced Search and use "subreport wraps" as the keywords. There are several threads on this topic.

-LB
 
I have done the search and the only answer I came up with was to make sure that the subreport is lined up with the rest of the report (formated the same height and aligned.) This has been done in this report and it still is wrapping. Any other thoughts?
 
Well, that is the solution. Have you verified that the sub is attached to guidelines by seeing if it moves when you move each guideline?

-LB
 
It does move when I move the guidelines, however it is not red in the corners to show it is attached, the way the fields in the primary report are. But it does move. Is there a way to make it attached so that the corners turn red the way the other ones do (for now I had dragged the subreport object to the guideline, along with the other fields and then moved the guideline to make sure they moved together -and they did.)
 
You need to test the guidelines on each of the four sides. They won't turn red, but all four should be attached. Make sure the height of all objects in the section is the same, and then minimize the height of the section.

-LB
 
I tested the guideline on all four sides - and it appears fine. Could it have something to do with the setup or format within the subreport?
 
Do you have null values to the left of the sub (for other fields)?

-LB
 
To the left is a running total that does produce some null values. (The whole thing is in a group footer)
 
Not sure if this will work, but try placing the running total in a text box, which could help preserve the space. But actually, this shouldn't make the sub wrap, it would make it move to the left.

Did you select all objects in the section->right click->format->same height? Try removing the subreport border, too before making the same height. Other than that I'm out of ideas--these steps have always worked for me.

-LB
 
Thank you so much for all of your attempts to help solve this problem! I think I am stuck with a wrapping subreport :) I decided to try to remove the running total all together to see if that was causing the problem - and removing it didn't solve the problem - so I am making the assumption that putting it in a text box won't solve it either.

I had already removed the subreport border and did the steps to make it the same height.

There is clearly something at work in this report or subreport that I am not able to identify to fix. I have sent the actual report to a colleague of mine to see if they can figure it out - if they do I will try to post it here so you and other forum readers could see this through to the end, but for now I think I have to stop obsessing over it and just let it be.
 
I had a similar problem and also had a column (a subreport) that sometimes evaluates to null. This is what works for me.

In the main report I created a formula that contains a single space. My main report contains a field that allows me to determine whether or not the subreport will have data for a particular detail record. My blank space formula field is aligned with but behind the subreport. In the format editor, common tab, the suppress property is checked and X+2 contains a formula to evaluate whether or not the subreport will contain data. If not, the the blank space is there to preserve horizontal alignment.

I also had the problem of the data breaking to a new line at the subreport when opened in Excel. I tried all of the alignment checks that lbass mentions but nothing worked. Finally, I found that, rather than have CR export to an xls file, export to a TAB delimited file (ttx) and then import it into Excel using the Data->Import External Data menu. The data now import without blank lines, records breaking over one or more lines, etc. The only problem I still have not solved is that some fields with long text strings display as "XXXXXXXXXXXXXXXXXXXXX..." although the data are there. Shorter strings in the same field display properly.

Peter
 
Another possibility is to have the subreport made very tiny in one section. Use Shared Variables to pass back the relevant details. In the next section, display both types of data.

This will proably mean a blank line for the subreport section, even if you make its output blank. But you should get a single line for the data.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 10 & 11.5 with Windows XP [yinyang]
 
PGFrank - can you explain how you set this up: "My main report contains a field that allows me to determine whether or not the subreport will have data for a particular detail record."

And are you suppressing the sub if null from the main report or in the sub.

 
I GOT IT TO WORK WITH A BIT OF A WORKAROUND.

Thank you PGFrank for the idea.

I exported it to Tab Separated Text(TTX)and associated that with notepad. Then copied the text in the notepad and pasted into excel and it split it into the correct cells on the correct rows.

Thank you all for your advice, I think this will work for us!
 
And just for future readers of this post - when I published this report to our enterprise server for others in my organization to access, the option to export to Tab Separated Text (TTX) did not exist. But exporting to Rich Text Format (RTF) worked. I then copied and pasted it into excel and it was fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top