Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

Form/ Subform report

Locked
ruiascensao
Posts: 177
Joined: Tue Nov 15, 2011 2:24 pm

Form/ Subform report

Unread post by ruiascensao »

Hi,
I'm triying to do a report based on 2 tables:
Batch: batch_id, batch_code, batch_user, batch_date, batch_size, batch_smp, batch_maf, batch_mif, batch_status
Jobs: jobs_id, batch_id, j_fault_id, jobs_code, jobs_num, jobs_sampled, jobs_imei, jobs_results, jobs_fname, jobs_fmaj, jobs_fmin

"Batch" is used in a form and "Jobs" is used in a subform of "Batch".
The ideia is to have a report for every Batch_Code. I'm trying to use this code on the report but seeems it is not working:

Code: Select all

$transaction = $formValue['hidden_batch_code'];

    $sql = "CREATE TABLE $dataTable"."details SELECT batch_id, batch_code, batch_user, batch_date, batch_size, batch_smp_size, batch_maf, batch_mif, batch_status";
    $sql = $sql." FROM batch";
    $sql = $sql." WHERE batch_code = '$transaction'";
    nuRunQuery($sql);
$printHTML = ' 


<object id=factory style="display:none" classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814"
  viewastext codebase="ScriptX.cab#Version=5,0,5,35">
</object>

<script defer>
function window.onload() {
  factory.printing.header = "HELLO WORLD!"
  factory.printing.footer = "Printing by ScriptX 5.0"
  factory.printing.portrait = false
  
  idPrint.disabled = false;
}
</script>


<p><input disabled name=idPrint type=button value="Print the page"
onclick="factory.printing.Print(0)">


';

$sql = "UPDATE $dataTable SET printButton = '$printHTML' ";
nuRunQuery($sql);
Could you please help me?
Regards,
Rui
BR
Rui
ruiascensao
Posts: 177
Joined: Tue Nov 15, 2011 2:24 pm

Re: Form/ Subform report

Unread post by ruiascensao »

Hi,

I have solved this subject based in your demos ...

Regards,
Rui
BR
Rui
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

Re: Form/ Subform report

Unread post by admin »

Cool!
Locked