Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
nuRunReports issue
nuRunReports issue
Hello when nuRunReports is used under an input button it opens JUST the report. The report I'm opening has a parameters screen which opens properly from the run reports section, however when trying to open it from a button with nuRunReports it just opens the report.
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: nuRunReports issue
Use the undocumented function nuGetReport() instead.
1st parameter: form Id
2nd parameter: report id
E.g.:
1st parameter: form Id
2nd parameter: report id
E.g.:
Code: Select all
nuGetReport('5d145a80c4cea5b','5f1e7039eb8b99a');
Re: nuRunReports issue
Almost works, the run button appears, but no form.
Report settings which does work correctly when run from the reports button Java under button
nuGetReport('BinOutRpt','BO1');
Also when the run button is pressed, what appears is a blank screen, not a blank report header/footer.
Report settings which does work correctly when run from the reports button Java under button
nuGetReport('BinOutRpt','BO1');
Also when the run button is pressed, what appears is a blank screen, not a blank report header/footer.
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
-
- nuBuilder Team
- Posts: 506
- Joined: Fri Dec 28, 2018 1:41 pm
- Location: Krakow, Poland
- Has thanked: 8 times
- Been thanked: 18 times
Re: nuRunReports issue
and maybe another try ...
If the run button works OK copy it on the form as html object.
typically it looks like:
so create HTML object on your form and in the HTML section paste the code from button Run
(the best run console navigate to Run button, select and copy element next paste the code to the HTML object)
If the run button works OK copy it on the form as html object.
typically it looks like:
Code: Select all
<input id="nurunButton" type="button" class="nuActionButton" value="Run" onclick="nuRunReport("FR_PART_RAP")">
(the best run console navigate to Run button, select and copy element next paste the code to the HTML object)
If you like nuBuilder, please leave a review on SourceForge
Re: nuRunReports issue
Ok that was the issue and it works fine now. Is there a way to find these id's without poking around in the database?
Also for the sake of others and readability/maintainability of the code, may I request that the java functions use a parameter to pass either an ID or Code? Or perhaps a CODE wrapper function to lookup the ID for an form or report.
Also for the sake of others and readability/maintainability of the code, may I request that the java functions use a parameter to pass either an ID or Code? Or perhaps a CODE wrapper function to lookup the ID for an form or report.
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: nuRunReports issue
Head over to the Developer Console (F12) andtreed wrote:Ok that was the issue and it works fine now. Is there a way to find these id's without poking around in the database?
... enter nuCurrentProperties().record_id to retrieve the current record id
.. enter nuCurrentProperties().form_id to retrieve the current form id
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: nuRunReports issue
If you add the additional developer buttons, you can view all this information - and more - on a button click:
https://github.com/smalos/nuBuilder4-Co ... ev_buttons
I find that these "developer buttons" make developing much easier.
https://github.com/smalos/nuBuilder4-Co ... ev_buttons
I find that these "developer buttons" make developing much easier.
You do not have the required permissions to view the files attached to this post.
Re: nuRunReports issue
Thanks! That makes finding the ID info easier and I like how new windows are popped up for the other functions. It doesn't address the code vs. id in the function issues.
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: nuRunReports issue
Since there's no such nuBuilder function, you'll have to write your own. It shouldn't be tough.treed wrote: It doesn't address the code vs. id in the function issues.