BusinessObjects Board

Parameter or Formula in a Crosstab

For the first time I am pulling in 3 databases into Crystal Report.

Each one will be a crosstab as it looks and answers the questions best.

The first crosstab is current year information on an event always updating
Second crosstab is last years info so that data will be static
Third crosstab is 5 years ago that data is static

I was thinking of a parameter on last years and 5 years ago data based date range to see basically this time last year and this time 5 years ago

Logically I wanted to put this time last year and 5 years ago formula in to those two crosstabs but I wanted to make sure it worked but the event doesn’t start collecting registrations until April so looking at this time will just show zeros. So I thought the parameter would be the best solution

Either would be great if I could figure out where to put the formula or parameter into the individual crosstabs

I did make a parameter field based on last years crosstab and it worked but it changed the information on the other crosstabs which don’t fall into the same year which didn’t make sense to me why it would change the number in 2018 when the parameter was based on 2017.

Any help would be appreciated and I am not super at crystal I basically muck about and have been pretty lucky figuring things out on my own.


Roesing (BOB member since 2019-01-31)

I highly recommend doing the following:

  1. Connect to only one database in the main report. You’ll put the date parameter in this report. In this example, I’ll use the current data here. Put the cross-tab for the current data on the main report.

  2. Connect to the data for last year in a subreport. If your parameter doesn’t need to change for this data, just use the parameter in the subreport links so that the subreport selects data based on the parameter. If the parameter, for example, is a date where you need to change the year, update it in a formula in the main report and use the formula as the subreport link to the last year data. Put the crosstab with last year’s data in this subreport.

  3. Repeat step 2 for the data from 5 years ago.

By doing this, you’re disconnecting the three data sets from each other except for the parameter or formula that is linking the main report to each of the subreports. This way if you make a change to the selection criteria for one, it won’t affect either of the others.

-Dell


hilfy :us: (BOB member since 2007-04-16)