Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Dynamic Coloumns in reports

Re: Dynamic Coloumns in reports

From: MarkyG <markg_at_mymail.tm>
Date: 29 Jun 2001 02:33:47 -0700
Message-ID: <ab87195e.0106290133.5cc66a2b@posting.google.com>

I'm assuming that you are talking about Oracle Reports.

The problem is that although you can pass different amounts of columns over using lexical parameters etc, the report layout is fixed and is expecting a certain amount of fields and types etc.

Possible solution (unless anyone else has more thoughts...)

You will have to create 1 report with ALL possible columns and arrange them in some kind of 'tidy' order.

  1. For each field you want to hide or show, create a reports parameter for it which will hold a value of YES or NO for example.
  2. In your Oracle Form, create a parameter for each field you want to hide or show. This should match the parameter names given in your report.
  3. Assuming the user has chosen their fields with a checkbox or something, you have to match the responses from the checkboxes to the forms parameters (e.g if the customer chose to see the sales field, the sales checkbox will be 'Y', therefore the parameter p_sales_field should be set to 'YES').
  4. Call your report using RUN_PRODUCT passing the parameters from the form to report.
  5. The tricky part is....for each field you want to hide, create a format trigger which says 'if parameter is YES then show field else hide it' (use the RETURN FALSE/TRUE booleans. You may also need to make the field collapseable if no data is to be shown, depending on your report layout.

Worked for me in the past.

HTH, Mark

"Omar Malik" <obNOSPAMmar_at_hotmail.com> wrote in message news:<9hf3fl02keg_at_enews1.newsguy.com>...
> Hello
> I was wondering what the procedure is for calling a report from a form but
> having different number of columns in the report. User is able to pick the
> columns from the form that they want to be shown on the report. Please let
> me know if this is done by sending some kind of parameters to the report or
> some other way.
> Thanks
Received on Fri Jun 29 2001 - 04:33:47 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US