cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Parameter Values

Former Member
0 Kudos

Hello,

Is it possible to pass dynamic parameter values to a crystal report?

For Ex: we have 10 different settlement number for 10 different vendor, when the report is scheduled, it should pick each of the settlement number and generate 10 different reports for those settlement numbers.

is it possible?

Thanks,

Vishal

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Vishal,

You've actually got 2 different issues here... So one at a time.

1) Yes you can easily pass dynamic parameters in CR take a look at the online help for more information.

See "Understanding dynamic prompts" and "Creating a parameter with a dynamic prompt" specifically.

2) If you are planning to schedule this report, which I take to mean that it will run automatically without end user assistance, a prompt isn't going to help you. A prompt is there to allow an end user to control the data they want to see at run time.

So if I'm misunderstanding your intent and the report will be run manually then a prompt will work. If the report will be scheduled then you'll need to add specific criteria to the Select Expert that will allow the report to pull the necessary records based on the data in your database.

HTH,

Jason

Former Member
0 Kudos

Jason,

Thank yo for your response.

I am able to add dynamic recipients to the publication and able to send the generated report thru emails.

The report has Settlement number, Company code and Fiscal year. Can i someway concatenate all these feilds to the filename.

Thanks,

Vishal

Former Member
0 Kudos

Well I suppose you could but it wouldn't do you any good. You'd actually want to create 3 separate parameters one for each field you want to filter on.

Jason

Former Member
0 Kudos

Jason,

I don't understand your previous reply.

Let me take an example.

Assuming my report name is "abc"

The report is scheduled for these below parameter values:

Settlement number is "1234"

Company code is "1000"

Fiscal Year is "2000"

The name of the file generated should be like:

<Report Name>_<Settlement Number>_<Company Code>_<Fiscal Year>

abc_1234_1000_2000.

Can above thing be achieved?

Thanks,

Vishal

Former Member
0 Kudos

Just put the parameter or the field values in the title line exactly the way you show them. One way is a text field containing the fields.

Former Member
0 Kudos

That would be hardcoded. I want that to be dynamic.

Vishal;

Former Member
0 Kudos

No, I don't think so-unless I am not understanding what you mean. The values will change with the parameter selection.

<Report Name>_<Settlement Number>_<Company Code>_<Fiscal Year>

Former Member
0 Kudos

I only have access to Crystal Reports Server (CRS) so I don't know what's available from BOE or other scheduling applications, but...

The available place holder options are

Title

ID

Owner

DateTime

Email Address

Full User Name

As a quick test I created a new report added a parameter and added the parameter name to the Title of the Summary Info. It read it as a hard coded value. It simply changed the nae of my report to {?My Parameter}.

I don't see any way to add the parameter selections to either the subject of the email or the file name.

Sorry,

Jason

Former Member
0 Kudos

Looks like we have to make use of some third party tool or BO SDK to acheieve that

Thanks Jason/DebiHerbert

-Vishal

Former Member
0 Kudos

thank you all!

Vishal

Edited by: vishal theegula on Oct 20, 2010 6:31 PM

Former Member
0 Kudos

@Jason Long

>

...

If the report will be scheduled then you'll need to add specific criteria to the Select Expert that will allow the report to pull the necessary records based on the data in your database.

...

> Jason

That sounds interesting! Right now I'm searching for such a solution. Could you please explain how you would do this?

Regards,

Chrigu

Former Member
0 Kudos

This is a closed thread so normally I'd request that you start a new one, but I suppose a quick example wouldn't hurt...

Scheduling reports with date parameters is the usual pain so I'll use that.

Rather that having the typical "Start Date & End Date" parameters (that are easy for users to use but make it impossible to schedule...), You'll want to use a series of predefined ranges.

... Such as:

Today, yesterday, last week, current week, current month, last month, last quarter, year to date...

You get the idea...

So step 1 is to create your parameter. I prefer to set it up as a static number parameter.

So for this example I'll set up for a simple "Last Month" or "Current Month" type of parameter...

1 = "Current Month"

2 = "Last Month"

Now for your selection criteria...


{Table.Name} IN (
(IF {?DateRangeParameter} = 1 THEN DateAdd("m", DateDiff("m", "#1/1/1900#, Today), #1/1/1900#) ELSE 
DateAdd("m", DateDiff("m", "#1/1/1900#, Today) -1, #1/1/1900#))
TO
(IF {?DateRangeParameter} = 1 THEN Today ELSE
DateAdd("m", DateDiff("m", "#1/1/1900#, Today), #1/1/1900#))

HTH,

Jason

Former Member
0 Kudos

Thank you, Jason! I opened a new thread but nobody had an idea. Therefore I answered on this closed thread. Please have a look on my threat. I'm not sure if your example would work for our requierment.

Regards,

Chrigu

Former Member
0 Kudos

Well #1, we're talking about 2 different animals here. What I'm talking about above, is programatically selecting a range of values based off of a single know value. You're talking about automatically executing the report once for every CustomerID.

Let me start by saying that I don't have or use BOE and I have no clue what it's capable of in terms of data driven scheduling. The only scheduling software I use is the CR Server XI R2 and it won't do anything like that.

Ido points people [HERE|http://www.kenhamady.com/bookmarks.html] quite a bit when they are looking for "off the wall" scheduling tools. You might find something too.

-


So... Lets say that neither BOE anything on Ken's site will help... Let's break down the problem...

#1) Q: Can a report be setup so that it only pulls data for a single customer?

A: Yes... No problem.

#2) Q: Can the came report be setup to "remember" the last customer it pulled, so that it can move on to the next customer without having to be told which one?

A: Sort of... It can be done using a SQL Command and would require writing data back to the database.

#3) Q: Can the report be scheduled to execute N number of times (where N = the number of CustomerIDs in your system?

A: If there is a way, I have no clue what it is.

#4) Q: Assuming that you can find an answer to #3... Is there a way to give each file a unique name based on the CustomerID or Customer Name?

A: If there is a way, I have no clue what it is.

-


My suggestion:

Run all customer in a single report and have it export to PDF. I would think you should be able to find a PDF splitting utility that would be able to parse the original PDF into multiple files based on a delimiter.

HTH,

Jason

Former Member
0 Kudos

Thanks for your ideas, Jason. We found a solution:

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

It is possible without using BO SDK.

While selecting email option, you have option to select automatically generated filename and custom filename.

we have to select custom filename option, there we have placeholders.

we should be selecting "%SI_NAME%%SI_USERFULLNAME%.%EXT%"

SI_USERFULLNAME comes from "fullname" field of dynamic recipients file. we have to concatenate the required parameters in that field.

Thank you,

Vishal

Former Member
0 Kudos

As far as I know those are the only options you have without getting into custom development. A while back, I wanted to append the date (only) to the end of my exported PDF files... I never had any luck. I had to stick with the more cumbersome DateTime stamp.

You may have better luck posting on one of the BOE forums where those folks are more familiar with the tips & tricks of BOE & CRS.

If you do come across a way to add to or alter the default place holder options, please add to this post. I'd love to know how myself.

Jason

Former Member
0 Kudos

Jason,

Make sure the required date is available in dynamic recipient source file,

The "Full Name:" under Dynamic Recipients can be mapped to your required date.

Now you can navigate to Destinations and select "User Full Name" from the placeholder, whereever required.

That should help and thats how we have passed concatenated value.

Regards,

Vishal

Edited by: vishal theegula on Oct 22, 2010 9:27 AM

Former Member
0 Kudos

I am trying to use %SI_USERFULLNAME% in "Use Specific Name field" of scheduler in-order to name each PDF per Dynamic Recipients Name (used FULLNAME from Report). But I am not able to get those reports named using FULLNAME.

May I know, if you have any details on how to get those Dynamic Recipients Names as each Individual report name.

Here I am trying these options using WebI reports.

Thanks,

KK

Edited by: kkrao_bo on Mar 29, 2011 7:02 PM