Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Bug Reports » Change number of columns in PDF list report
Change number of columns in PDF list report [message #4078] Thu, 27 February 2014 22:45 Go to next message
haider.faraz is currently offline  haider.faraz
Messages: 15
Registered: July 2013
Junior Member
That works, thankyou.

There is another issue I am trying to work around and I would be greatful for your help. The issue is as follows:
I have a report where the number of columns may vary from one instance of the report to another. The only work around I can think of within the framework was to use the '_cm_output_multi' function and to define in the report structure file a number of zones such as multiK, multiK+1,...multiN where K is the minimum number of columns and N is the maximum number of possible columns.

In the function I will always know the number of columns to output and so having determined that I would output the data as an array/resultset only in the multiK+X zone.

I attempted to use the 'ignore_if_empty' flag in the style for all my zones with data only in the multiK+X zone. I had expected that this would lead the other zones not to appear and that using this method I could resolve the issue of a dynamic number of columns for my report.

However, the 'ignore_if_empty' flag did not work as I expected. Is this a bug? Or if not is there another workaround?
Re: Change number of columns in PDF list report [message #4079 is a reply to message #4078] Fri, 28 February 2014 04:48 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2371
Registered: April 2006
Location: Surrey, UK
Senior Member
The 'ignore_if_empty' option is only designed to be used in the DETAIL view or TITLE contents.

I haven't tried it, but you may be able to edit the contents of the report structure file after it has been loaded (but before it is used) which exists in $object->report_structure.

Alternatively you may set $object->report_structure to null and set $GLOBALS['report'] to the name of an alternative report structure file.


[Updated on: Fri, 28 February 2014 06:40]

Report message to a moderator

Re: Change number of columns in PDF list report [message #4080 is a reply to message #4079] Fri, 28 February 2014 06:01 Go to previous messageGo to next message
haider.faraz is currently offline  haider.faraz
Messages: 15
Registered: July 2013
Junior Member
thank you, this works!!

[Updated on: Fri, 28 February 2014 06:40] by Moderator

Report message to a moderator

Re: Change number of columns in PDF list report [message #4081 is a reply to message #4080] Fri, 28 February 2014 06:18 Go to previous messageGo to next message
haider.faraz is currently offline  haider.faraz
Messages: 15
Registered: July 2013
Junior Member
I am using the following function to change the column count at run time:

    function _cm_pre_output($filename)
    {
    	array_pop($this->report_structure['multi1']['fields'][0]);
        return $filename;
    } // _cm_pre_output


One can then have a single report structure file with N number of columns defined in it and call the function:
array_pop($this->report_structure['multi1']['fields'][0]);

Y times such that N-Y = K.

[Updated on: Fri, 28 February 2014 06:40] by Moderator

Report message to a moderator

Re: Change number of columns in PDF list report [message #4082 is a reply to message #4081] Fri, 28 February 2014 06:37 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2371
Registered: April 2006
Location: Surrey, UK
Senior Member
Glad you got it working.

[Updated on: Fri, 28 February 2014 06:41]

Report message to a moderator

Re: Change number of columns in PDF list report [message #4084 is a reply to message #4082] Sun, 02 March 2014 19:32 Go to previous messageGo to next message
haider.faraz is currently offline  haider.faraz
Messages: 15
Registered: July 2013
Junior Member
I am stumbling on another issue in my report and I wonder if this one is possible:

I need to create a report with multiple cells per line, such that the first three cells fill the entire height of the line, but the cells that follow are made up of 3 vertically stacked sub-cells within a cell.

In HTML this can be achieved using the rowspan attribute. Is there a way to achieve the same effect within the radicore framework?

[Updated on: Sun, 02 March 2014 23:40]

Report message to a moderator

Re: Change number of columns in PDF list report [message #4085 is a reply to message #4084] Mon, 03 March 2014 00:43 Go to previous message
haider.faraz is currently offline  haider.faraz
Messages: 15
Registered: July 2013
Junior Member
I found an answer to this question in an earlier post: http://www.radicore.org/forum/index.php?t=msg&th=418& ;start=0&S=f388f2da9cc4f71e0cc8d81630f25980
Previous Topic: PDF does not print cells with only 'zero' (string or integer)
Next Topic: Adding line breaks to text fields
Goto Forum:
  


Current Time: Wed Dec 04 04:04:40 EST 2024

Total time taken to generate the page: 0.01825 seconds