conditional subreport

conditional subreport

Forum member · Feb 6, 2020
Hi my requirement it just like hide or show some column of controll base on my condition like i have 3 subreport want to hide and show base of by condition from c#

Re: conditional subreport

Support · Feb 6, 2020
Hello, You can dynamically suppress the layout of a specific element using the LayingOut event. You can set the the Layout property (Boolean) of the LayingOutEventArgs object to false. DynamicPDF ReportWriter does not support hiding a specific sub report dynamically. Thanks, ceTe Software Support Team

Re: conditional subreport

Forum member · Feb 7, 2020
Thanks for reply, Senario is that i have draw one table with 5 column in subreport and in some condition i need to remove specific colum and in other condition add specific column plz provide way

Re: conditional subreport

Support · Feb 7, 2020
Hello, The PDF creation is completely dependent on the DLEX file (layout template). You can suppress the layout of specific data by setting the Layout property to false in LayingOut event of the Layout element (RecordBox or RecordArea). It is not possible to add a new column or layout element dynamically to the DLEX file. Thanks, ceTe Software Support Team

Re: conditional subreport

Forum member · Feb 11, 2020
Thanks , I found alternat way but again i stuck in case. Should i pass page.element or page in supreport? I draw table in page And now i want to pass that page in subreport Or table in subreport.

Re: conditional subreport

Forum member · Feb 11, 2020
Thanks , I found alternat way but again i stuck in case. Should i pass page.element or page in supreport? I draw table in page And now i want to pass that page in subreport Or table in subreport.

Re: conditional subreport

Support · Feb 11, 2020
Hello, You can add a page element (Table, Image, TextArea, etc) to the PDF report dynamically using a PlaceHolder layout element. You will need to place a PlaceHolder in a sub report. Use the LaidOut event of the Placeholder layout element to add a page element. You can refer to the documentation on handling events here . The code sample in the help topic is for adding a barcode to the PDF using the LaidOut event. Similarly you can add a Table page element. Thanks, ceTe Software Support Team

Re: conditional subreport

Forum member · Feb 12, 2020
Thanks i already did it. But i stuck in one case that files i send you in mail @ support ok I already buy license so u can got mail from piyush.prajapati@cygnetinfotech.com So please provide me solution for one of the problem. I will attach both my .net file and pdf Thanks Piyush prajapati

Re: conditional subreport

Forum member · Feb 13, 2020
Please provide me an example of create table in recoard box using any among datatable, table

Re: conditional subreport

Support · Feb 19, 2020
Hello, You can create a PDF report, using a DataTable. You will need to add the DataTableReportData to the NameValueLayoutData. The DataTableReportData should be added with the DataTable retrieved from the Database. Below is a code sample to create a PDF report using version 10 of DynamicPDF ReportWriter. Please note that, you will need to set the DataName for the Details section (DLEX file) accordingly with the Key name specified in the Add method of NameValueLayoutData. static void Main(string[] args) { DocumentLayout report = new DocumentLayout(@"Mydocument.dlex"); NameValueLayoutData layoutData = new NameValueLayoutData(); layoutData.Add("Invoice", RetriveSqlOrderReportData()); Document document = report.Layout(layoutData); document.Draw("MyDocument.pdf"); } private static DataTableReportData RetriveSqlOrderReportData() { SqlConnection con = new SqlConnection(@"Add a valid connection string"); con.Open(); SqlCommand cmd = new SqlCommand("Sql query to retrieve the data", con); SqlDataReader reader = cmd.ExecuteReader(); DataTable table = new DataTable("Invoice"); table.Load(reader); return new DataTableReportData(table); } Thanks, ceTe Software Support Team

Re: conditional subreport

Forum member · Mar 16, 2020
Hi i use formetted record area in which i pass string with <b></b> but it is not bold my text

Re: conditional subreport

Support · Mar 16, 2020
Hello, We tested this on our end using v10 of DynamicPDF ReportWriter and are unable to recreate the behavior. The text specified with a bold tag is added to the PDF as bold text. If you are setting a custom font then make sure to add the font family using the respective regular, bold, bold italics and italics fonts (OTF or TTF). Set this font family to the element using font face property. To do this, select the FormattedRecordArea element in DLEX file, click on the Font face property>>Edit>>Add a font family>>Set the respective OTF or TTF fonts for the styles. Thanks, ceTe software Support Team