Home
Analytics
BIRT - Adding Dataset on Master Page - URGENT PLS
CuriousTec
Hi all,
I have created a BIRT report which is working fine. I am now having a problem with adding a table on the Master Page with 6 rows. I need to have this information on the masterpage because it has to appear on every page - giving description of the Acronyms used in the report. I know that you can not add a dataset on the master page so how else can I accomplish this task? Please help. I am in a very tight schedule. Thank you.
Find more posts tagged with
Comments
kabilan_n
Hi,
I think there is no option for inserting table in a master page.[not sure - upto my knowledge i am saying].
but you can do that by dragging grid into the masterpage header and within that you can insert dataset data's and also provide label for that. By this way you can create a table structure.
Hope this will help you.
-- Kabil
Yogesh Maharwade
You have to drag a grid on master page header or footer then you can able to create a grid which looks like table report that will show on every page.
hope this helps.
CuriousTec
<blockquote class='ipsBlockquote' data-author="'piwya'" data-cid="91515" data-time="1323787424" data-date="13 December 2011 - 07:43 AM"><p>
You have to drag a grid on master page header or footer then you can able to create a grid which looks like table report that will show on every page.<br />
<br />
hope this helps.<br /></p></blockquote>
CuriousTec
Thank you for your prompt response. The acronym descriptions I have are in a dataset and when I add the dataset to a grid it only display the first row of 6 rows. Tables cannot be dragged into the master page (this is why it is making this task hard to accomplish). Does someone out there have a suggestion on the workaround?
Thank you for your response.
mwilliams
Take a look at this devShare post:
http://www.birt-exchange.org/org/devshare/designing-birt-reports/1294-dataset-table-data-in-masterpage-header/
CuriousTec
<blockquote class='ipsBlockquote' data-author="'CuriousTec'" data-cid="91523" data-time="1323793943" data-date="13 December 2011 - 09:32 AM"><p>
Thank you for your prompt response. The acronym descriptions I have are in a dataset and when I add the dataset to a grid it only display the first row of 6 rows. Tables cannot be dragged into the master page (this is why it is making this task hard to accomplish). Does someone out there have a suggestion on the workaround?<br />
<br />
Thank you for your response.<br /></p></blockquote>
CuriousTec
Birt Guru,
Thank you for sending me the DevShare link. I have used this example once before but it did not work for me. I have added all the information required (initialize the HTML table) create HTML table etc, but when I preview the report the HTML table is not displayed. This is what I have so far:
This is added under onFetch)
if (htmlTable == ""){
htmlTable = "<table border=\"1\"><tr><td>" + row["ACRONYM"] + "</td></tr>"
}
else{
htmlTable = htmlTable + "<tr><td>" + row["ACRONYM"] + "</td></tr>"
}
My table has only one column with not heading.
This is the information that I have on the masterpage textbox: <VALUE-OF format="HTML">htmlTable + "</table>";</VALUE-OF>.
Please let me know what I am doing wrong. I am using "birt-eclipse-designer-3.7.1
mwilliams
Did you bind the text box to the dataSet so that the dataSet is ran? If not, it won't show because your code will not run.
CuriousTec
Birt Guru,
You are very right. That is what I needed - bind the textbox to the dataset. It is now working. I really appreciate your timely response.
mwilliams
Not a problem. Let us know whenever you have questions!
mzeevalk
The devshare solution does not appear to work when rendering the report to PDF (using frameset URL in BIRT 3.7.1) when multiple reports are generated. We are seeing that if 10 reports are generated in a single PDF file that the data from the last report is being displayed in the master page for all reports. It works fine if a single report is generated. Any suggestions?
mwilliams
When you say 10 reports, do you mean there are 10 groups that you run the report for? Could you use the group header to display your table, instead of the masterpage header? Or do you need it in the masterpage, for sure?
mzeevalk
Yes, by 10 reports I mean 10 groups. The reason why we went the master page route is that this is a 4 page letter where the first page contains letterhead information and the 2nd-4th pages contain information that we are storing from the onFetch event of the main data set. I guess I can try using the group header, but since we don't want to see the data we are capturing in the table now on page one of each group, we'll have to track group page numbers (or the group data value) and if the page number is equal to 1 (or the group value changes) then hide the group header. Let me know if you are aware of a way to do this at the master page level when generating to PDF through the frameset URL. Thanks in advance.
mwilliams
Take a look at this report. It uses persistentGlobalVariables in the onCreate of the group header and report variables are set in the onPageEnd event. A grid and variable auto texts are used in the masterpage header. Let me know if you have questions.
learnbirt1
I have implemented persistentGlobalVariables solution in my report.But somehow I am getting null values for page variables.I am attaching the report design.Can you please let me know if i am missing any thing. I really appreciate your timely response.
Thanks in advance.
mwilliams
Can you try attaching the file again? I don't see it. Thanks!
learnbirt1
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="101587" data-time="1338615121" data-date="01 June 2012 - 10:32 PM"><p>
Can you try attaching the file again? I don't see it. Thanks!<br /></p></blockquote>
<br />
<br />
Please see the attached file..Thanks alot
mwilliams
I don't see where you're setting your global variables, anywhere. Can you point me to where that is? I see where you try to get them, but I don't see where you're setting them. Let me know.
actuser9
BIRT Guru,
I tried to implement the page variable solution that you provided for the change of group by means of the global variable. But the group name is not populating on the master page header.
My report is based on the scripted data set that is populating data based on a java pojo object. What might be causing the issue?
Any inputs are highly appreaciated.
actuser9
Placing the OnCreate script on the table group instead of the header row did the trick. But if the group data is flowing into multiple pages, the report is not showing the correct group name.
actuser9
Yes, this too resolved with placing the oncreate script on the header row. Scripting is fun only when the purpose is understood. Thanks.
RepBIRT
Michael,
The Page variable are getting displayed from the second page of the report. The first page of the report is not having the master page dataset.
mwilliams
Can you post an example where you're having this issue, so I can look at it and see exactly what you're doing? Or are you talking about the devShare example? Let me know.
nukinov
<blockquote class="ipsBlockquote" data-author="RepBIRT" data-cid="107047" data-time="1341861282"><div><p>Michael,
The Page variable are getting displayed from the second page of the report. The first page of the report is not having the master page dataset.</p></div></blockquote><p> </p><p>Hi Michael,</p><p> </p><p>I am having the same issue here. And the devShare Example you posted has the same behaivour. The first page is blank and the second page displays the value, which is expected on the previous page.</p><p> </p><p>Any suggestions?</p><p> </p><p>EDIT: Sorry, it worked! Only in the "View Report as PDF" option of eclipse the error occures.</p>