0

I am facing an issue in the report in which my written xml is not bound into the report. The result is blank report. Any help? Links where i got the idea from:

https://gallery.technet.microsoft.com/scriptcenter/Dynamic-RDLC-Generator-6237aa44

Generating report from rdlc xml string

  • 1
    Your query string in first link is added here : /* Local Query */. So first start by using SQL Server Management Studio and test query to see if you are getting results. The RDLC is HTML format so some special characters like the ampersand have to be replace from & to just '&'. – jdweng Sep 17 '20 at 10:20
  • 1
    @jdweng buddy, i don't have a query. I'm just trying to generate the report with XML string generated in the report Engine and attach it to the .rdlc report. The problem is that the report is blank just as the normal one in the Design part; i.e. my loaded xml string is not attached to the RDLC report. Can u give solution other than query? I am not using here SSRS just RDLC – Elias Shamoun Sep 17 '20 at 11:42
  • 1
    I will give you my code right here, so that u have idea of what I am doing – Elias Shamoun Sep 17 '20 at 11:44
  • 1
    I am trying to load the XML into the rdlc thats my issue – Elias Shamoun Sep 17 '20 at 11:47
  • 1
    You would have to pass the xml as a string parameter into the RDLC, or add the xml to a view using as a insert query and then have the RDLC read the view. – jdweng Sep 17 '20 at 12:44
  • Actually I solved it with XMLDocument, It returned an image now just its about to generate the tablix and everything dynamically – Elias Shamoun Sep 17 '20 at 13:16
  • So you passed the XmlDocument as a parameter to the RDCL. – jdweng Sep 17 '20 at 13:24
  • Yes Yes, now I need only to make it full dynamic (the RDLC) – Elias Shamoun Sep 17 '20 at 13:53
  • You may need additional parameters to make dynamic. – jdweng Sep 17 '20 at 13:55

1 Answers1

0

It Worked!, it was something related to parameters!!

parameters[0] = new ReportParameter("FeeColumnVisibility", withFee.ToString()); System.Array.Resize(ref parameters, 4);

In which the Parameters are needed to declare whether i need some specific columns or not The WithFee is a boolean variable that is also something related to my work