Skip to main content
Solved

Static Parameter to Crystal Quick Report

  • March 4, 2021
  • 7 replies
  • 461 views

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.

This topic has been closed for replies.

7 replies

EntNadeeL
Hero (Partner)
Forum|alt.badge.img+10
  • Hero (Partner)
  • March 4, 2021
 

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
  • Author
  • Hero
  • March 4, 2021

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)
  • March 4, 2021

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
  • Author
  • Hero
  • March 5, 2021

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)
  • March 5, 2021

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
  • 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)
  • 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.

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,