Jump to content

No Pages for Main Report Doesn\'t work


jchirag0221

Recommended Posts

Hi,

I am sure my  case would be little bit weird. I am using main-report just to pass parameters to my sub-report.

I only one have sub-report. I am using collections in My main report and then converting in string and then passing it to my sub-report using below expression.

((($P{pm_customer_list}.toString()).replace("[","")).replace("]","").toUpperCase())

In my sub-report I am using stored procedure which returns a result set in a table format and my sub-report shows that correctly.

e.g.

SELECT    *
FROM    TABLE
    (
        jasper_report.f_jsr_get_tt_000_cus_ex
        (
        CAST ($P{p_customer_list} AS VARCHAR2(4000)),
        )
    )

In my main report , I am writing SQL as below

select *

from dual

So that it can atleast run the sub-report, (If I don't write that then it even don't run the sub-report and shows no data)  Help me if there is any other way to run sub-report.

I am using this method main report converting collection into string so that my stored procedure handles and builds the query and then returns the result set. - Is there any other way to convert Java collection into Oracle Varchar2?

I have put my sub-report in Detail band of the main report.

It works fine if there is data to show in sub-report. But it doesn't show No Data if the sub-report doesn't return any thing. Because I have got Select * from dual in my main query which always return 'X'. 

My proerty of of "When No Data" for main report is set to "No Pages"

I understand that this is bit complicated way of setting the report but it gives more flexibility in terms of building the query in PL/SQL in back-end and then return the result set in table format.

 

From

Chirag

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...