Author |
Message |
venham
Newbie
Joined: 28 Sep 2011
Location: Canada
Online Status: Offline
Posts: 11
|
Topic: Adding Column Selection when printing with multipl Posted: 13 Dec 2013 at 4:42am |
I have a report that will show several order related fields and wish to assign the data to a column on a report based on the shipping week. The idea is to use Crystal to select the data for a spreadheet that the user needs. The report shows 4 columns and I have calculated the dates from an initial parameter that will decide the column placement but can't find a reference anywhere as to how to assign data to a column based on a variable. The report would look like the following:
Week 1 Week 2 Week 3 Week 4 Order Ship Date Order Ship Date Order Ship Date Order Ship Date
Thanks in advance for your help!
|
IP Logged |
|
lockwelle
Moderator
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
|
Posted: 13 Dec 2013 at 4:56am |
the best that you can do is to create a formula that will 'display' the data in the correct column based on the logic /criteria that you have.
you can also use the same type of logic to conditionally suppress a column as well.
HTH
|
IP Logged |
|
venham
Newbie
Joined: 28 Sep 2011
Location: Canada
Online Status: Offline
Posts: 11
|
Posted: 13 Dec 2013 at 5:45am |
Thanks for the help but I must be missing something when you suggest displaying the data in the correct column. What I am missing is how to select the correct column. Detail section in Section Expert has selected Format using Multiple Columns but that just presents the data as if it has overflowed at the page break.
|
IP Logged |
|
lockwelle
Moderator
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
|
Posted: 13 Dec 2013 at 5:59am |
you would have a formula, let's call it column1.
in the formula you would have logic, like
if {table.field} = someValue then
{table.orderDate}
else
if {table.field} = someOtherValue then
{table.shipDate};
you are not truly 'assigning' a value to a column, you are just telling CR which column to display.
Oh, yeah, and for this formula, you would place it on the report in the column1 for the Detail section, so that column1 would change what is displayed based on your logic.
Hopefully this is clearer than mud
|
IP Logged |
|
venham
Newbie
Joined: 28 Sep 2011
Location: Canada
Online Status: Offline
Posts: 11
|
Posted: 13 Dec 2013 at 6:26am |
Feeling muddy but is this what you mean? Create 4 variables, Week1 to Week4, that are text boxes that could contain each of the individual fields that I wish to display ie., "Order_no Ship_date" and then based on the ship date, I would select the appropriate text box. If this is what you mean, won't I get the data for the exported spreadsheet expressed as just 4 columns of the text boxes and not the individual fields within the text box? Or have I missed something? Nonetheless thanks for the help so far!
|
IP Logged |
|
lockwelle
Moderator
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
|
Posted: 13 Dec 2013 at 6:31am |
that was not what I meant at all.
create 1 formula, which would have the logic, based on the ship date, that would display the correct date desired.
place the formula where you would place the datafield (normally). Now, the formula will display only 1 value and the report and the export will be happy.
if you can envision having all 4 fields in the same location and using logic to conditionally suppress them...then just move that logic into the formula and have only 1 field on the report with logic to display the correct value.
any better?
|
IP Logged |
|
venham
Newbie
Joined: 28 Sep 2011
Location: Canada
Online Status: Offline
Posts: 11
|
Posted: 17 Dec 2013 at 3:07am |
Sorry for the delay in responding ... I hope that the following screen shot might explain what I am trying to do more accurately. Please have a look at http://someruffcomp.com/sample/Container.jpg which is a display of the current report. When column D date changes to 12/16, I'd like the display to move to the columns starting under the 12/16 heading.
|
IP Logged |
|
venham
Newbie
Joined: 28 Sep 2011
Location: Canada
Online Status: Offline
Posts: 11
|
Posted: 03 Jan 2014 at 1:24am |
Hoping for an update on my problem as I don't understand how your solution from 12/13 will fix my issue
|
IP Logged |
|
lockwelle
Moderator
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
|
Posted: 03 Jan 2014 at 4:52am |
since your fear of 4 formulas being exported as 4 columns, replace the 4 formulas with just 1 formula, so that there will be just 1 column in the export.
currently, with the 4 formulas you have to conditionally show and suppress them so that the report looks correct. By combining them into 1 formula, you no longer have that issue.
Usually, or perhaps more accurately, in my experience, CR exports only that which is visible in the report. So I would have thought that export with 4 formulas would be exactly the same as the export with 1 formula...
and I have been wrong before.
HTH
|
IP Logged |
|
|