Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic Header #230

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

davidmichaelakers
Copy link

Adding the ability to conditionally specify headers and macros using a new dynamic header. See provided examples for possible use case. This addresses ticket #218 and other similar requests.

Adds a new header DYNAMIC, which allows you to control headers and macros from php, giving you more flexibility in how you create your reports.
If a sales rep views this report they can only see his or her own sales. Non-sales reps will be able to select a specific sales rep, or see all sales.
Conditionally include the variable header for selecting a sales rep, or the sales_rep_id macro.
@lolaslade
Copy link

lolaslade commented Feb 6, 2018

I tried this patch and it did allow me to add a dynamic header but not to include a "database_options" section in a PHP report. The dropdown for that was still empty.

The first issue I encountered was case sensitivity in the Header class names.

859a1b2#diff-75bde2a484a48e29ed0ba2597e579ddbR36

needs to change to something like:
$report->parseHeader(ucwords(strtolower($header['name'])), $header['params']);

@apcloic
Copy link

apcloic commented Feb 12, 2019

Hi,

@davidmichaelakers I'm not able to make it work on a php report, could you provide another example using database_options on a php report ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants