Hi NB Team
i am trying to elaborate a table report and i just got blank spaces
this is my code
nuRunQuery(
<<<EOSQL
CREATE TABLE #dataTable#
SELECT *
FROM an_anticipos
ORDER BY fecha_an
EOSQL
);
$resultSet = nuRunQuery("SELECT * from #dataTable# ");
while ($row = db_fetch_object($resultSet)) {
$fecha_an = $row->fecha_an;
$par_progr_an = $row->par_prog_an;
$par_avance_an = $row->par_avance_an;
$avance_prog_an = $row->avance_prog_an;
$avance_avance_an = $row->avance_avance_an;
$desv_prog_an = $row->desv_prog_an;
$desv_avance_an = $row->desv_avance_an;
//nuRunQuery($s);
}
on Report Writer Detail Block fields name`s are $fecha_an (and the rest of fields) results on blanks and if i switch to fecha_an (and the rest of fields without $) results a data row but not the way i need it cause every row appears on every detail block.
I just want to display all rows on one detail block.
Please any advice or help is appreciated.
Thanks.
Welcome to the nuBuilder forums!
Please register and login to view forums and other content only available to registered users.
Please register and login to view forums and other content only available to registered users.
Trying to build an table report style
-
- Posts: 503
- Joined: Thu May 24, 2012 2:08 am
- Location: Milan, Italy
- Contact:
Re: Trying to build an table report style
Ralcala,
nuBuilder report code works on #dataTable# table data: you don't need to execute WHILE() cicle.
To access your data just insert the column name in report objects (without $ sign):
If so, you can insert your report objects in a section other than Detail: you can create new custom section clicking on Section/Sort in Report Writer: Hope this helps,
Max
nuBuilder report code works on #dataTable# table data: you don't need to execute WHILE() cicle.
To access your data just insert the column name in report objects (without $ sign):
Do you know the number of rows you get from your query??Ralcala wrote:I just want to display all rows on one detail block.
If so, you can insert your report objects in a section other than Detail: you can create new custom section clicking on Section/Sort in Report Writer: Hope this helps,
Max
-
- Posts: 11
- Joined: Fri Aug 16, 2013 4:14 pm
Re: Trying to build an table report style
Hi Max thank you for your answer
i do what you tell me but i got blue screen of death nb every time i try to run the report here is the report code
simplified..
$s = "CREATE TABLE #dataTable# ";
$s .= "SELECT * FROM an_anticipos ";
$s .= "ORDER BY fecha_an";
nuRunQuery($s);
and in the Report body i inserted a new section as you guide me and create a new object for the field but nothing happens
BTW if a put it back to Detail section it works… and the ____nu*********_____ table that make every time got an error browsing it show table data but i dont know whats going on...
As you noted i am a newbie on NB world sorry for bother you with my newbieness..
i do what you tell me but i got blue screen of death nb every time i try to run the report here is the report code
simplified..
$s = "CREATE TABLE #dataTable# ";
$s .= "SELECT * FROM an_anticipos ";
$s .= "ORDER BY fecha_an";
nuRunQuery($s);
and in the Report body i inserted a new section as you guide me and create a new object for the field but nothing happens
BTW if a put it back to Detail section it works… and the ____nu*********_____ table that make every time got an error browsing it show table data but i dont know whats going on...
As you noted i am a newbie on NB world sorry for bother you with my newbieness..
-
- Posts: 503
- Joined: Thu May 24, 2012 2:08 am
- Location: Milan, Italy
- Contact:
Re: Trying to build an table report style
Ralcala,
my first question is: how many rows you get from your query?
If you get more then one row, you MUST insert your objects in Detail section, to make nuBuilder print them; alternatively, you can modify #dataTable# as you want in your code (for example, executing ALTER TABLE queries) to obtain only one row in #dataTable#.
Furthermore, the new report section you created have a height value? But, first of all, try to insert a nuDebug() function before nuRunQuery():
then try to copy/paste the query in phpmyadmin to make sure syntax is correct.
my first question is: how many rows you get from your query?
If you get more then one row, you MUST insert your objects in Detail section, to make nuBuilder print them; alternatively, you can modify #dataTable# as you want in your code (for example, executing ALTER TABLE queries) to obtain only one row in #dataTable#.
Furthermore, the new report section you created have a height value? But, first of all, try to insert a nuDebug() function before nuRunQuery():
Code: Select all
nuDebug($s); // you can inspect the real query sent to MySQL in Setup -> Debug (or zzsys_trap table in phpmyadmin)
nuRunQuery($s);