Skip to main content
Solved

Static Parameter to Crystal Quick Report


Forum|alt.badge.img+9

I have a Crystal Quick report under Customer order view.
I have two custom Menus (MenuItem1 and MenuItem2) which prints the same report.

MenuItem1 = Print the report with the “Summary” field

MenuItem2 = Print the report without the “Summary” field

I have added an Crystal report parameter - Print_Summary
If Print_summary is true, summary is shown else suppressed.

My question is how can I pass a static parameter value True or False to these MenuItem1 or MenuItem2 so that I can show or hide Summary.

I do not want user to change the quick report parameter during runtime - that is the reason I use two different menus for the same report.

Best answer by geminirajesh

Hi Nadeesha,

 

thanks for your suggestions..

I did a work around and added LINE_NO as Source_Key_Name for the MenuItem1 and did not add this Qucik report parameter for MenuItem2

By this way.. when the Parameter ISNULL() I can Suppress the Summary field.

 

Passing Static value won’t work as we expected.. so instead I passed some field name which would always have an value and  use ISNULL() to suppress the Summary field on the report.

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

7 replies

EntNadeeL
Hero (Partner)
Forum|alt.badge.img+10
  • Hero (Partner)
  • 181 replies
  • March 4, 2021
 
geminirajesh wrote:

I have a Crystal Quick report under Customer order view.
I have two custom Menus (MenuItem1 and MenuItem2) which prints the same report.

MenuItem1 = Print the report with the “Summary” field

MenuItem2 = Print the report without the “Summary” field

I have added an Crystal report parameter - Print_Summary
If Print_summary is true, summary is shown else suppressed.

My question is how can I pass a static parameter value True or False to these MenuItem1 or MenuItem2 so that I can show or hide Summary.

I do not want user to change the quick report parameter during runtime - that is the reason I use two different menus for the same report.

Hi @geminirajesh ,

You can map the parameters to crystal report parameters

Try mapping this way.

I have created reports by passing key names. But this should work too. Because this works when we perform other menu types.

Let me know if this doesn’t work.

Regards,

Nadeesha. 


Forum|alt.badge.img+9

Hi Nadeesha,

 

I have this already.. but still it does not work.

The report still shows the default value of the parameter (False)

 

 

 


EntNadeeL
Hero (Partner)
Forum|alt.badge.img+10
  • Hero (Partner)
  • 181 replies
  • March 4, 2021
geminirajesh wrote:

Hi Nadeesha,

 

I have this already.. but still it does not work.

The report still shows the default value of the parameter (False)

 

 

 

Hi @EntNadeeL ,

It could be the format for True and False.

First you have to check what is received from report side. and then pass the same format (Could be False, not FALSE).

Also try quotes for true and false(‘False’).

One of these should work. 

Because what you have done is right. Since it is a static value format could be the reason. I had a similar experience passing a date recently. 

Regards,

Nadeesha. 


Forum|alt.badge.img+9

Hi Nadeesha,

 

Unfortunately, these options did not work.

I tried TRUE, True, ‘True’   …. it still kept showing False - which was the first value of the Boolean parameter on the report.


EntNadeeL
Hero (Partner)
Forum|alt.badge.img+10
  • Hero (Partner)
  • 181 replies
  • March 5, 2021
geminirajesh wrote:

Hi Nadeesha,

 

Unfortunately, these options did not work.

I tried TRUE, True, ‘True’   …. it still kept showing False - which was the first value of the Boolean parameter on the report.

Then we have to check the debug console and see where go wrong with the query. That's what I would do normally.  

Or you could share the PLSQL trace which shows how they take parameters and pass it to the report.

Regards,

Nadeesha.


Forum|alt.badge.img+9
  • Author
  • Hero
  • 38 replies
  • Answer
  • March 18, 2021

Hi Nadeesha,

 

thanks for your suggestions..

I did a work around and added LINE_NO as Source_Key_Name for the MenuItem1 and did not add this Qucik report parameter for MenuItem2

By this way.. when the Parameter ISNULL() I can Suppress the Summary field.

 

Passing Static value won’t work as we expected.. so instead I passed some field name which would always have an value and  use ISNULL() to suppress the Summary field on the report.


EntNadeeL
Hero (Partner)
Forum|alt.badge.img+10
  • Hero (Partner)
  • 181 replies
  • March 18, 2021
geminirajesh wrote:

Hi Nadeesha,

 

thanks for your suggestions..

I did a work around and added LINE_NO as Source_Key_Name for the MenuItem1 and did not add this Qucik report parameter for MenuItem2

By this way.. when the Parameter ISNULL() I can Suppress the Summary field.

 

Passing Static value won’t work as we expected.. so instead I passed some field name which would always have an value and  use ISNULL() to suppress the Summary field on the report.

Now that i think about it we could have a custom field (persistent) with the TRUE value and use it here. 

But thanks for letting me know. I have tried only the other way around. 

 

Kind Regards,


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings